Ejemplo n.º 1
0
    private IEnumerator MoveAction(GameObject interactable, TaisenUnit unit)
    {
        PostActionBegin(new TurnActionEventArgs(false));
        unit.OccupiedTile.AdjacentTiles.ForEach(adjTile => adjTile.EnableHexCollider(false));
        unit.OccupiedTile.AdjacentTiles.ForEach(adjTile => adjTile.HighlightHexTile(false));
        unit.SetOccupiedTile(interactable.GetComponent <HexTile>());

        Debug.Log("Move Action");

        yield return(new WaitForSeconds(2f));

        yield return(StartCoroutine(MoveConclusion()));
    }
Ejemplo n.º 2
0
    public void TurnActionInteraction(ActionType act, GameObject interactable, TaisenUnit unit)
    {
        switch (act)
        {
        case ActionType.MoveAction:
            StartCoroutine(MoveAction(interactable, unit));
            break;

        /*
         * case ActionType.AttackAction:
         *
         *  break;
         *
         * case ActionType.CatchAction:
         *
         *  break;
         */
        default:
            break;
        }
    }
Ejemplo n.º 3
0
 protected virtual void Awake()
 {
     currentNumberOfActions = 0;
     turnActions            = GetComponent <TaisenUnitTurnActions>();
     unit = GetComponent <TaisenUnit>();
 }