Skip to content

Commit

Permalink
Prepare zone creation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Jul 28, 2023
1 parent d44ac43 commit 7872020
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion Assets/Scripts/Cgs/Play/PlayController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,40 @@ public Token CreateToken()

private void CreateZone(GamePlayZone gamePlayZone)
{
Debug.Log("TBD");
var position = CardGameManager.PixelsPerInch *
new Vector2(gamePlayZone.Position.X, gamePlayZone.Position.Y);
var size = CardGameManager.PixelsPerInch *
new Vector2(gamePlayZone.Size.X, gamePlayZone.Size.Y);
switch (gamePlayZone.Type)
{
case GamePlayZoneType.Area:
CreateAreaZone(position, size, gamePlayZone.Face);
break;
case GamePlayZoneType.Horizontal:
CreateHorizontalZone(position, size, gamePlayZone.Face);
break;
case GamePlayZoneType.Vertical:
CreateVerticalZone(position, size, gamePlayZone.Face);
break;
default:
CreateAreaZone(position, size, gamePlayZone.Face);
break;
}
}

private void CreateAreaZone(Vector2 position, Vector2 size, FacePreference facePreference)
{
Debug.Log($"CreateAreaZone position: {position}, size: {size}, face: {facePreference}");
}

private void CreateHorizontalZone(Vector2 position, Vector2 size, FacePreference facePreference)
{
Debug.Log($"CreateHorizontalZone position: {position}, size: {size}, face: {facePreference}");
}

private void CreateVerticalZone(Vector2 position, Vector2 size, FacePreference facePreference)
{
Debug.Log($"CreateVerticalZone position: {position}, size: {size}, face: {facePreference}");
}

public void OnDrop(CardModel cardModel)
Expand Down

0 comments on commit 7872020

Please sign in to comment.