示例#1
0
    public void Cast(GChess chess)
    {
        Vector2Int direction = chess.location - owner.location;

        chess.PushToward(direction, distance);
        chess.ElementReaction(element);
    }
示例#2
0
    public override void Perform()
    {
        GChess chess = GridManager.instance.GetChess(owner.location + direction);

        if (chess != null)
        {
            chess.ElementReaction(Element.Ice);
        }
    }
    public override void Perform()
    {
        Vector2Int[] range          = GetAffectRange();
        Vector2Int   targetPosition = range[range.Length - 1];
        GChess       chess          = GridManager.instance.GetChess(targetPosition);

        if (chess != null)
        {
            chess.ElementReaction(element);
        }
    }
示例#4
0
 public void Cast(GFloor floor)
 {
     Debug.Log(floor);
     GridManager.instance.InstansiateChessAt(prefabtest, floor.location);
     Vector2Int[] dir = new Vector2Int[] { Vector2Int.down, Vector2Int.up, Vector2Int.left, Vector2Int.right };
     foreach (Vector2Int d in dir)
     {
         GChess t = GridManager.instance.GetChess(floor.location + d);
         if (t != null)
         {
             t.ElementReaction(Element.Fire);
         }
     }
 }
 IEnumerator PostEnvironmentTurn()
 {
     for (int i = 0; i < stormLocation.Count; i++)
     {
         Vector2Int location = stormLocation[i];
         GChess     t        = GridManager.instance.GetChess(location);
         if (t != null)
         {
             t.ElementReaction(Element.Ice);
         }
         stormParticle[i].GetComponent <MeshRenderer>().material.SetColor("_Color", Color.yellow);
         Destroy(stormParticle[i], 1f);
         yield return(new WaitForSeconds(1f));
     }
     stormLocation.Clear();
     stormParticle.Clear();
     GameManager.instance.EnvironmentPostTurnEnd();
 }
示例#6
0
    async public override UniTask ProcessAsync()
    {
        Vector2Int[] range          = GetAffectRange();
        Vector2Int   targetLocation = range[range.Length - 1];

        await Shoot(targetLocation);

        GChess chess = GridManager.instance.GetChess(targetLocation);

        if (chess != null)
        {
            chess.ElementReaction(element);
            Debug.Log(chess.location);
        }
        else
        {
            Debug.Log("Miss");
        }
    }
示例#7
0
 public void Cast(GChess chess)
 {
     chess.ElementReaction(Element.Fire);
     chess.Warm();
 }
示例#8
0
 public void Cast(GChess chess)
 {
     chess.ElementReaction(element);
     GridManager.instance.GetFloor(chess.location).ElementReaction(element);
 }