Пример #1
0
    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);
    }
Пример #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);
 }
Пример #3
0
 public void DoARed(int player, ShotCoord coord)
 {
     if (player == 0)
     {
         playerSide.RedTile(coord);
     }
     else
     {
         cpuSide.RedTile(coord);
     }
 }
Пример #4
0
 public void DoAGreen(int player, ShotCoord coord)
 {
     if (player == 0)
     {
         playerSide.GreenTile(coord);
     }
     else
     {
         cpuSide.GreenTile(coord);
     }
 }
Пример #5
0
 private Rectangle GetTile(ShotCoord coord)
 {
     return(tiles[coord.Index]);
 }