/// <summary> /// Ctor for supporting scripting /// </summary> public DialogTrigger(int priority, int numberOfRepeat, ACondition.FireCondition fireCondition, ACondition.FireCondition deleteCondition, string id) { Clear(); this.id = id; this.type = TriggerType.DIALOG; this.fullId = id; this.priority = priority; this.repeat = numberOfRepeat; this.fireCondition = fireCondition; this.deleteCondition = deleteCondition; this.fireFlag = false; this.delFlag = false; this.triggered = false; }
public void ProcessTimelineEvent(string eventId, string param) { if (eventId != "CP") return; //WebPlayerDebugManager.addOutput(eventId + " " + param, 2); switch (param) { case "Pause": Speed = 0; timeLine.PauseSlider(); break; case "Unpause": Speed = 1; timeLine.UnpauseSlider(); break; case "Activate": timeLine.isActive = true; timeLine.VisibleWhenInScreen = true; timeLine.gameObject.SetActive(true); timeLine.Show(true); break; case "Start": relTimeCondCP = new TimerCondition(TimerType.Relative, timeStep, TimeSource); //true after timestep triggerCPTime = new ScriptTrigger<int>(1, -1, relTimeCondCP.Check, null, UpdateCPTime, 1); AddTrigger(triggerCPTime); lastTime = (float) TimeSource.Time; timeLine.StartSlider(); break; case "Deactivate": timeLine.isActive = false; timeLine.VisibleWhenInScreen = false; timeLine.gameObject.SetActive(false); timeLine.Show(false); break; case "Stop": RemoveTrigger(triggerCPTime); timeLine.StopSlider(); break; } }