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())); }
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; } }
protected virtual void Awake() { currentNumberOfActions = 0; turnActions = GetComponent <TaisenUnitTurnActions>(); unit = GetComponent <TaisenUnit>(); }