| 12345678910111213141516171819202122232425262728 |
- 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
- }
- }
- }
- }
|