/******************************************** OTHER FUNCTIONS *************************************************** * This section holds all other functions that might be called by the primitives to retrieve values for example.* * In principle, every function in this section should only be called from within primitives. * ****************************************************************************************************************/ /// <summary> /// Initialize the main manager /// </summary> private void Init() { this.resources = new List <GameObject>(); this.spawn_c = null; this.selected_unit = null; this.resource_spawn_area = new Area(this.game_area.center, this.game_area.width / 12.0f, this.game_area.height - 30.0f); if (Initializer.Actual != null) { if (!PropertiesManager.Actual.PropertiesAssigned) { PropertiesManager.Actual.AssignProperties(); } GroupController.ClearGroups(); BehaviorController.ClearBehaviors(); BehaviorController.LoadBehaviors(1, Initializer.Actual.red_team); BehaviorController.LoadBehaviors(2, Initializer.Actual.blue_team); this.spawn_delay = (float)60 / (float)Initializer.Actual.ressources_time; this.max_resources = Items.WarResource.MaxRessources; } this.InitTeams(); }