public override void Initialize() { // Level initialization #region PreInit InteractiveObject.GetGroup("CanteenMainDoorLight").ForEach(obj => obj.ChangeLightsColor(ColorTemplates.Get.NormalRed, 0.4f).ChangeMaterialColor("_EmissionColor", ColorTemplates.Get.BrightRed, 0.4f)); TriggerFunctions = new Dictionary <string, System.Action>(); GameObject testSwarmling = Resources.Load <GameObject>("SpawnableActors/TestSwarmling"); #endregion // Triggers initialization #region Canteen #region Canteen_Main_Door TriggerFunctions["OpenCanteenMainDoor"] = () => { (Entity.GetById("CanteenMainDoor") as Door).Open(); InteractiveObject.GetGroup("CanteenMainDoorLight").ForEach(obj => obj.ChangeLightsColor(ColorTemplates.Get.NormalCyan, 0.4f).ChangeMaterialColor("_EmissionColor", ColorTemplates.Get.BrightCyan, 0.1f)); Entity.GetById("CanteenEliteSoldier")?.AsActor().AsNPC().OrderAssembler.Walk(new Vector3(-39.899f, 51.155f, -1.971f)); }; TriggerFunctions["CloseCanteenMainDoor"] = () => { (Entity.GetById("CanteenMainDoor") as Door).Close(); }; #endregion #region Canteen_Access_Error TriggerFunctions["CanteenAccessError"] = () => { InteractiveObject.GetGroup("CanteenAccessError").ForEach(obj => obj.ChangeLightsColor(ColorTemplates.Get.NormalRed, 0f).ChangeMaterialColor("_EmissionColor", ColorTemplates.Get.BrightRed, 0f)); MainManager.Instance.MainCameraController.Shake(0.5f, 1, 1.4f, 10); Entity.GetById("DummyEntity").DelayedInvoke(() => { InteractiveObject.GetGroup("CanteenAccessError").ForEach(obj => obj.ChangeLightsColor(new Color(0, 0, 0, 0), 0f).ChangeMaterialColor("_EmissionColor", Color.black, 0f)); SoundManager.Instance.PlayClipAtPoint(Resources.Load <AudioClip>("SFX/energy_off"), default, 0.05f);