private async Task DoorSequence() { if (trigger == true) { return; } trigger = true; Utils.ShowWardenMessage("msgCat::Obj.Info" + "\n>\n<size=200%><color=red>" + "Issue with security bypass, standby." + "</color></size>"); await Task.Delay(1 * 1000); lightCollection = LG_LightCollection.Create(chainedPuzzleInstance.m_sourceArea.m_courseNode, new Vector3(0, 0, 0), LG_LightCollectionSorting.Distance, float.MaxValue); sound.Post(EVENTS.LIGHTS_OFF_GLOBAL); foreach (CollectedLight light in lightCollection.collectedLights) { light.light.ChangeIntensity(0); if (light.light.m_category == LG_Light.LightCategory.Emergency || light.light.m_category == LG_Light.LightCategory.Door || light.light.m_category == LG_Light.LightCategory.DoorImportant || light.light.m_category == LG_Light.LightCategory.Sign) { light.light.ChangeColor(new Color(1, 0, 0, 1)); } } await Task.Delay(4 * 1000); sound.Post(EVENTS.LIGHTS_ON_INTENSITY_1); LightsOnForCatagory(LG_Light.LightCategory.Emergency); //Main.log.LogDebug("1"); await Task.Delay(1 * 1000); sound.Post(EVENTS.LIGHTS_ON_INTENSITY_2); LightsOnForCatagory(LG_Light.LightCategory.DoorImportant); //Main.log.LogDebug("2"); await Task.Delay(1 * 1000); sound.Post(EVENTS.LIGHTS_ON_INTENSITY_3); LightsOnForCatagory(LG_Light.LightCategory.Door); //Main.log.LogDebug("3"); await Task.Delay(1 * 1000); sound.Post(EVENTS.LIGHTS_ON_INTENSITY_4); LightsOnForCatagory(LG_Light.LightCategory.Sign); //Main.log.LogDebug("4"); await Task.Delay(5 * 1000); HelpText = showHelp.show; }
public void Update() { switch (HelpText) { case showHelp.show: var wardenObj = WardenObjectiveManager.Current.m_activeWardenObjectives[LG_LayerType.MainLayer]; wardenObj.ShowHelpDelay = 0; WardenObjectiveManager.Current.AttemptInteract(new pWardenObjectiveInteraction() { forceUpdate = true, inLayer = LG_LayerType.MainLayer, newSubObj = eWardenSubObjectiveStatus.GoToZoneHelp, type = eWardenObjectiveInteractionType.UpdateSubObjective }); WardenObjectiveManager.Current.UpdateFromInLevel(); HelpText = showHelp.notActive; Utils.UnlockDoor(); break; } }