public override void Poke(Parent parent) { base.Poke (parent); Sentence sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey); if(sentence != null){ tree.actions.BroadcastSentence(sentence, range); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject target = tree.GetFromBlackboard<GameObject>(targetKey); if(target != null && tree.actions.IsInRange(target, range)){ parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); object obj = tree.GetFromBlackboard<object>(key); if(obj != null){ tree.AddToBlackboard(copyKey, obj); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject room = tree.actions.GetEmptyRoom(); if(room != null){ tree.AddToBlackboard(emptyRoomKey, room); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); if(sentence == null){ sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey); } if(sentence != null){ tree.actions.DisplaySentence(sentence, seconds); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject noun1 = tree.GetFromBlackboard<GameObject>(noun1Key); GameObject noun2 = tree.GetFromBlackboard<GameObject>(noun2Key); if(noun1 != null && noun2 != null){ tree.AddToBlackboard(sentenceKey, new Sentence(noun1, verb, noun2)); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject target = tree.GetFromBlackboard<GameObject>(targetKey); if(target != null){ ///Debug.Log("targetPoint"); //Debug.Log (target); //Debug.Log (target.transform.position); tree.AddToBlackboard(destinationKey, target.transform.position); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); tree.actions.SetSpeed(speed); parent.ReceiveStatus(Status.Success); }
public override void Poke(Parent parent) { base.Poke (parent); object obj1 = tree.GetFromBlackboard<object>(obj1Key); object obj2 = tree.GetFromBlackboard<object>(obj2Key); //if(obj1 == default(T) || obj2 == default(T)){ // parent.ReceiveStatus(Status.Failure); //} //TODO CHECKS if(obj1.Equals(obj2)){ parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); if(roomKey == null){ tree.AddToBlackboard(destinationKey, tree.actions.RandomPointInRandomRoom()); } else{ GameObject room = tree.GetFromBlackboard<GameObject>(roomKey); if(room == null){ parent.ReceiveStatus(Status.Failure); return; } tree.AddToBlackboard(destinationKey, tree.actions.RandomPointInRoom(room)); } parent.ReceiveStatus(Status.Success); }
public override void Poke(Parent parent) { base.Poke (parent); if(inputSentence == null){ inputSentence = (Sentence) tree.GetFromBlackboard<Sentence>(inputSentenceKey); } if(inputSentence != null){ Sentence response = tree.eventManager.knowledgeBase.GetResponse(inputSentence); tree.AddToBlackboard(responseKey, response); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); Debug.Log (tree.eventManager.gameObject); Debug.Log ("says"); Debug.Log (message); parent.ReceiveStatus(Status.Success); }
public override void Poke(Parent parent) { base.Poke (parent); Sentence sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey); if(target == null){ target = (GameObject) tree.GetFromBlackboard<GameObject>(targetKey); } if(sentence != null && target != null){ tree.actions.Whisper(sentence, target); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject location = tree.GetFromBlackboard<GameObject>(locationKey); if(location == null){ parent.ReceiveStatus(Status.Failure); } else{ GameObject aloneWith = tree.actions.GetAloneWith(location); if(aloneWith != null){ tree.AddToBlackboard(aloneWithKey, aloneWith); parent.ReceiveStatus(Status.Success); } else{ parent.ReceiveStatus(Status.Failure); } } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject target = tree.GetFromBlackboard<GameObject>(targetKey); if(target != null){ tree.actions.Follow(target, this, stopping); } else{ parent.ReceiveStatus(Status.Failure); } }
public override void Poke(Parent parent) { base.Poke(parent); GameObject victim = tree.GetFromBlackboard<GameObject>(victimKey); if(victim == default(GameObject)){ parent.ReceiveStatus(Status.Failure); } else{ tree.actions.Kill(victim, this); } }
public override void Poke(Parent parent) { base.Poke (parent); GameObject target = tree.GetFromBlackboard<GameObject>(targetKey); if(target == null){ //Debug.Log ("Target Null"); parent.ReceiveStatus(Status.Failure); return; } GameObject location = tree.actions.FindRoomTargetIsIn(target); if(location == null){ //Debug.Log ("Location Null"); parent.ReceiveStatus(Status.Failure); return; } tree.AddToBlackboard(locationKey, location); parent.ReceiveStatus(Status.Success); }
public override void Poke(Parent parent) { base.Poke(parent); if(destinationSet == false){ destination = tree.GetFromBlackboard<Vector3>(destinationKey); } if(destination == default(Vector3)){ parent.ReceiveStatus(Status.Failure); } else{ //Debug.Log (tree.eventManager.gameObject); //Debug.Log (destination); tree.actions.TravelTo(destination, this); } }