//This is called once each time the task is enabled. //Call EndAction() to mark the action as finished, either in success or failure. //EndAction can be called from anywhere. protected override void OnExecute() { gameMode.value = GameEventRegistry.GetGameMode(); EndAction(true); }
//Called once per frame while the condition is active. //Return whether the condition is success or failure. protected override bool OnCheck() { Debug.Log("AARON: Game mode: " + GameEventRegistry.GetGameMode() + "==" + gameMode.value); return(gameMode.value == GameEventRegistry.GetGameMode()); }