예제 #1
0
    //function called by the chosen action
    public void actionChosen(ChosableAction action)
    {
        switch (action)
        {
        case ChosableAction.Attack:
            //TODO: the player must be able to choose its target
            combatManager.makeCharacterAct(characterInMenu, combatManager.getCharacterFromName(characterInMenu).weapon, new List <Character> {
                combatManager.getRandomEnemy()
            });
            break;

        case ChosableAction.Skip:
            break;

        case ChosableAction.Flee:
            Debug.Log("Flee not implemented yet !");     //TODO code the flee feature
            break;

        case ChosableAction.Skill:
            Debug.LogError("Wrong function called. you need to call the actionChosen(ChosableAction, string) for a Skill");
            break;

        default:
            Debug.LogError("Not treated action: " + action);
            break;
        }
        actionSelected();
    }
예제 #2
0
 public void actionChosen(ChosableAction action, string chosenSkill)
 {
     if (action != ChosableAction.Skill)
     {
         Debug.LogError("Wrong function called. you need to call the actionChosen(ChosableAction) for a non Skill action");
         return;
     }
     Debug.Log("Skill not implemented yet !"); //TODO code the Skill feature
     actionSelected();
 }