public void RedTile(ShotCoord coord)
    {
        Rectangle tile = GetTile(coord);

        DOTween.To(() => tile.Color, x => tile.Color = x, Color.red, 0.25f).OnComplete(() =>
                                                                                       DOTween.To(() => tile.Color, x => tile.Color = x, Color.white, 0.25f)).SetEase(Ease.InCirc);
    }
Example #2
0
 private ShotCoord[] GenerateShotCoords()
 {
     ShotCoord[] result = new ShotCoord[3];
     for (int i = 0; i < 3; i++)
     {
         result[i] = new ShotCoord(selectedTileIndexes[i]);
     }
     return(result);
 }
Example #3
0
 public void DoARed(int player, ShotCoord coord)
 {
     if (player == 0)
     {
         playerSide.RedTile(coord);
     }
     else
     {
         cpuSide.RedTile(coord);
     }
 }
Example #4
0
 public void DoAGreen(int player, ShotCoord coord)
 {
     if (player == 0)
     {
         playerSide.GreenTile(coord);
     }
     else
     {
         cpuSide.GreenTile(coord);
     }
 }
 private Rectangle GetTile(ShotCoord coord)
 {
     return(tiles[coord.Index]);
 }