// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { Debug.Log("Space"); activeSet = !activeSet; _myRelayNode.MmInvoke(MmMethod.SetActive, activeSet, new MmMetadataBlock(MmLevelFilter.Child, MmActiveFilter.All)); } if (Input.GetKeyDown(KeyCode.Alpha1)) { TutorialRelaySwitch.MmInvoke(MmMethod.Switch, "Item1", new MmMetadataBlock(MmLevelFilter.Self, MmActiveFilter.All)); } if (Input.GetKeyDown(KeyCode.Alpha2)) { TutorialRelaySwitch.MmInvoke(MmMethod.Switch, "Item2", new MmMetadataBlock(MmLevelFilter.Self, MmActiveFilter.All)); } if (Input.GetKeyDown(KeyCode.Alpha3)) { TutorialRelaySwitch.MmInvoke(MmMethod.Switch, "Item3", new MmMetadataBlock(MmLevelFilter.Self, MmActiveFilter.All)); } }
/// <summary> /// Prepare the completion state FSM entry/exit delegates /// </summary> public virtual void InitializeCompletionFSM() { TaskStateFSM = new FiniteStateMachine <TaskState> (gameObject.name + "_TaskStateFSM") { LogMessage = MmLogger.LogApplication }; TaskStateFSM[TaskState.Complete].Enter = delegate { if (_mmRelayNode != null) { _mmRelayNode.MmInvoke(MmMethod.Complete, true, new MmMetadataBlock(MmLevelFilter.Parent)); } }; TaskStateFSM.JumpTo(TaskState.NotComplete); TaskStateFSM[TaskState.Complete].Exit = delegate { if (_mmRelayNode != null) { _mmRelayNode.MmInvoke(MmMethod.Complete, false, new MmMetadataBlock(MmLevelFilter.Parent)); } }; }
// Use this for initialization public override void Start() { base.Start(); _myRelayNode = GetComponent <MmRelayNode>(); _myRelayNode.MmInvoke(MmMethod.Initialize, new MmMetadataBlock(MmLevelFilterHelper.SelfAndChildren, MmActiveFilter.All)); _myRelayNode.MmInvoke((MmMethod)20, new MmMetadataBlock(MmLevelFilterHelper.SelfAndChildren, MmActiveFilter.All)); }
void Update() { if (Input.GetKeyDown(KeyCode.Space)) { active = !active; _myRelayNode.MmInvoke( MmMethod.SetActive, active, new MmMetadataBlock(MmLevelFilter.Child, MmActiveFilter.All) ); } }
/// <summary> /// Mercury timing test. /// </summary> public void TestMercury() { int counter = 0; while (counter < Repetitions) { if (!simpleLock) { simpleLock = true; stopWatch.Start(); myNode.MmInvoke(MmMethod.Initialize, mmBlock); counter++; } } }