| 1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using RPG_Fight_Test.Assets.Scripts.Creatures;
- using UnityEngine;
- public class RoundManager : MonoBehaviour
- {
- private List<Creature> combatants;
- int round;
- internal void startFirstRound(List<Creature> combatants)
- {
- this.combatants = combatants;
- round = 1;
- makeDecisions();
- }
- private void makeDecisions()
- {
- foreach (Creature creature in combatants)
- {
- if (creature.isHumanControlled())
- {
- CameraManager.getInstance().focusOnGameObject(creature.gameObject);
- // Wait for human decision
- }
- else
- {
- ((Skeleton)creature).decideActions(combatants);
- // AI make decision
- }
- }
- }
- }
|