public static void InitializeSave(CampaignGameStarter starter) { if (Singleton == null) { Singleton = new OnSaveStartRunBehaviour(); } Singleton.alreadyRun = false; starter.AddBehavior(_singleton); }
private void AddBehaviours(CampaignGameStarter starter) { if (!removalMode) { starter.AddBehavior(new Spawn.SpawnBehaviour(Data.SpawnDataManager.Instance)); starter.AddBehavior(new AI.HourlyPatrolAroundSpawnBehaviour()); starter.AddBehavior(new AI.AttackClosestIfIdleForADayBehaviour()); starter.AddBehavior(new AI.PatrolAroundClosestLestInterruptedAndSwitchBehaviour()); starter.AddBehavior(new Diplomacy.ForcedWarPeaceBehaviour()); starter.AddBehavior(new Diplomacy.ForceNoKingdomBehaviour()); starter.AddBehavior(new PrisonerRecruitment.PrisonerRecruitmentBehaviour()); currentOnSaveStartRunBehaviour = new UtilityBehaviours.OnSaveStartRunBehaviour(); starter.AddBehavior(currentOnSaveStartRunBehaviour); currentOnSaveStartRunBehaviour.RegisterFunctionToRun(OnSaveStart); } else { starter.AddBehavior(new Utils.RemoverBehaviour()); } }
public static void InitializeSingleton(CampaignGameStarter starter) { _singleton = new OnSaveStartRunBehaviour(); starter.AddBehavior(_singleton); }