예제 #1
0
 static void GenerateMonsterActions()
 {
     for (int i = 0; i < monsters.Count; ++i)
     {
         Attack newAttack = new Attack(monsters[i]);
         newAttack.AddTarget(playerChars[Random.Range(0, playerChars.Count)]);
         actions.Add(newAttack);
     }
 }
예제 #2
0
    public void LaunchBasicAttack()
    {
        Attack baseAttack = new Attack(this);
        //Choose a random target for your attack
        int nPlayers = BattleEventHandler.Player.Count;

        baseAttack.AddTarget(BattleEventHandler.Player[Random.Range(0, nPlayers)]);
        baseAttack.ExecuteAction();
    }