Пример #1
0
        public AmeisenStateMachineManager(
            AmeisenDataHolder ameisenDataHolder,
            AmeisenDBManager ameisenDBManager,
            AmeisenMovementEngine ameisenMovementEngine,
            IAmeisenCombatClass combatClass)
        {
            Active = false;

            AmeisenDataHolder = ameisenDataHolder;
            AmeisenDBManager  = ameisenDBManager;
            CombatClass       = combatClass;

            MainWorker         = new Thread(new ThreadStart(DoWork));
            StateWatcherWorker = new Thread(new ThreadStart(WatchForStateChanges));

            StateMachine = new AmeisenStateMachine(ameisenDataHolder, ameisenDBManager, ameisenMovementEngine, combatClass);
        }
        public AmeisenStateMachineManager(
            AmeisenDataHolder ameisenDataHolder,
            AmeisenDBManager ameisenDBManager,
            AmeisenMovementEngine ameisenMovementEngine,
            IAmeisenCombatPackage combatPackage,
            AmeisenCharacterManager characterManager,
            AmeisenNavmeshClient ameisenNavmeshClient)
        {
            Active = false;

            AmeisenDataHolder       = ameisenDataHolder;
            AmeisenDBManager        = ameisenDBManager;
            CombatPackage           = combatPackage;
            AmeisenNavmeshClient    = ameisenNavmeshClient;
            AmeisenCharacterManager = characterManager;
            AmeisenMovementEngine   = ameisenMovementEngine;

            MainWorker         = new Thread(new ThreadStart(DoWork));
            StateWatcherWorker = new Thread(new ThreadStart(WatchForStateChanges));
            StateMachine       = new AmeisenStateMachine(ameisenDataHolder, ameisenDBManager, ameisenMovementEngine, combatPackage, characterManager, ameisenNavmeshClient);
        }
 public void UpdateCombatPackage(IAmeisenCombatPackage combatPackage)
 {
     CombatPackage = combatPackage;
     StateMachine  = new AmeisenStateMachine(AmeisenDataHolder, AmeisenDBManager, AmeisenMovementEngine, combatPackage, AmeisenCharacterManager, AmeisenNavmeshClient);
 }