public Drop(Rigidbody p_dropRigid, Transform p_dropTrans, GameObject p_trash, Verhalten p_verhalten, ParentNode p_parent) { parent = p_parent; verhalten = p_verhalten; dropRigid = p_dropRigid; dropTrans = p_dropTrans; trash = p_trash; trashlist = new List <GameObject>(); trash1 = GameObject.Instantiate(trash); trash2 = GameObject.Instantiate(trash); trash3 = GameObject.Instantiate(trash); trashlist.Add(trash1); trashlist.Add(trash2); trashlist.Add(trash3); trashlist[0].SetActive(false); trashlist[1].SetActive(false); trashlist[2].SetActive(false); trashcount = 0; maxTime = 10; parent.addChild(this); isActive = false; }
public MyInterruptTask(ParentNode p_parent, Verhalten p_verhalten) { interrupts = new List <MyInterruptor>(); parent = p_parent; verhalten = p_verhalten; parent.addChild(this); }
public MyInterruptor(Verhalten p_verhalten, ParentNode p_parent) { parent = p_parent; verhalten = p_verhalten; parent.addChild(this); isInterrupted = false; isActive = false; }
public void BessertSich(Verhalten neuesVerhalten) { // Enum values are integers ranging from 0 and counting up // so if the new behaviour is less than the old one it's better // , because the enum values are ordered from good to not so great. if (Verhalten.CompareTo(neuesVerhalten) == -1) { Verhalten = neuesVerhalten; } }
public CollectTrash(Rigidbody p_seekerRigidbody, Transform p_seekerTransform, Verhalten p_verhalten, ParentNode p_parent) { seekerRigidbody = p_seekerRigidbody; seekerTransform = p_seekerTransform; verhalten = p_verhalten; parent = p_parent; parent.addChild(this); isActive = false; trashCollected = false; }
public Wander(Rigidbody p_wanderRigidbody, Transform p_wanderTransform, Verhalten p_verhalten, ParentNode p_parent) { wanderRigidbody = p_wanderRigidbody; wanderTransform = p_wanderTransform; parent = p_parent; verhalten = p_verhalten; parent.addChild(this); isActive = false; }
public Seek(Rigidbody p_seekerRigidbody, Transform p_seekerTransform, Transform p_targetTransform, Verhalten p_verhalten, ParentNode p_parent) { seekerRigidbody = p_seekerRigidbody; seekerTransform = p_seekerTransform; targetTransform = p_targetTransform; verhalten = p_verhalten; parent = p_parent; parent.addChild(this); isActive = false; }
public SaveWanderer(Rigidbody p_SeekerRigid, Transform p_SeekerTrans, Rigidbody p_TargetRigid, Transform p_TargetTrans, Vector3 p_saveSpot, Verhalten p_verhalten, ParentNode p_parent) { seekerRigid = p_SeekerRigid; seekerTrans = p_SeekerTrans; targetRigid = p_TargetRigid; targetTrans = p_TargetTrans; saveSpot = p_saveSpot; verhalten = p_verhalten; parent = p_parent; parent.addChild(this); isActive = false; }
public Kind(string name, Verhalten verhalten, string[] wuensche = null) { Name = name; Verhalten = verhalten; Wunschlos = true; Wuensche = new string[3]; index = 0; if (wuensche == null) { return; } foreach (string w in wuensche) { WunschAnhaengen(w); } }