void Awake() { AIRig aiRig = GetComponentInChildren <AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; tSens = aiRig.AI.Senses as RAIN.Perception.BasicSenses; }
void Awake() { AIRig aiRig = GetComponentInChildren <AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; tNav = aiRig.AI.Navigator as RAIN.Navigation.BasicNavigator; }
//[RAINSerializableField] //private GameObject boxDeTravail; //[RAINSerializableField] //private GameObject chill; //[RAINSerializableField] //private Transform _target; // [RAINSerializableField] //private float motivation = 100;// variable conditionnant le départ en pause. motivation = 0 -> go to Pause; public override void Think() { RAIN.Memory.BasicMemory tMemory = AI.WorkingMemory as RAIN.Memory.BasicMemory; GameObject targ = tMemory.GetItem("myTarget") as GameObject; //Debug.Log ("boxxboxxboxxboxx: "+ boxx.name); //print ("dd"); // create target //GameObject target = (GameObject)Instantiate(Resources.Load("prefab/target2")); //target.transform.position = new Vector3(22, 1, 6); //_target = targ.transform.GetChild (0); // Debug.Log ("_target: "+ _target.name); if (targ != null) { //targ.gameObject.GetComponentInChildren<NavigationTargetRig>().Target.MountPoint = target.transform; //targ.gameObject.GetComponentInChildren<NavigationTargetRig>().Target.TargetName = "NavTarget"; //AI.Motor.MoveTo (targ.transform.GetChild (0).position); // AI.Motor.MoveTo (targ.gameObject.GetComponentInChildren<NavigationTargetRig>().Target.Position); AI.Motor.MoveTo(targ.transform.position); } }
// accesseur pour savoir si le musicien est en train de danser public bool IsTheMusicianDancing() { AIRig aiRig = sceneLeader.GetComponentInChildren <AIRig>(); RAIN.Memory.BasicMemory tMusicianMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; return(tMusicianMemory.GetItem <bool>("isDancing")); }
void Start() { moveLocked = hatarakeLocked = true; AIRig aiRig = GetComponentInChildren <AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; tMotor = aiRig.AI.Motor as RAIN.Motion.MecanimMotor; /* * moveLocked = true; * hatarakeLocked = true;*/ foreach (Transform go in transform) { if (go.name == "Cylinder") { actionArea = go; } } tNav = aiRig.AI.Navigator as RAIN.Navigation.BasicNavigator; //navComponent = this.transform.GetComponent <NavMeshAgent>(); }
// Use this for initialization void Start() { audioEventName = defaultAudioEventName; AIRig aiRig = GetComponentInChildren <AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // récupération des composants RAIN endWaitTimer = (int)Random.Range(minEndWaitTimer, maxEndWaitTimer); // séléction aléatoire de la fin du timer d'attente }
void Start() { AIRig aiRig = GetComponentInChildren <AIRig>(); // récupération du composant RAIN tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // récupération de la mémoire RAIN startingFragment.GetComponent <levitation>().IsHeld(true); // désactivation de la lévitation du fragment avec lequel le guide commence startingFragment.GetComponent <InteractibleObject> ().OnTouch(); //rammassage du fragment de départ du guide PickUpObject(startingFragment); //idem }
// Use this for initialization public void Start() { AIRig aiRig = GetComponentInChildren <AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // référence sur mémoire RAIN endSoundTimer = (int)Random.Range(minEndSoundTimer, maxEndSoundTimer); // initialisation aléatoire de timer endWaitTimer = (int)Random.Range(minEndWaitTimer, maxEndWaitTimer); }
public override void Init(GameObject agent) { base.Init(agent); memory=new RAIN.Memory.BasicMemory(); memory.AIInit(rainAI); memory.SetItem<AIController>("controller",this); environment = GetEnvironment(); mind = new BasicMind(); mind.AIInit(rainAI); mind.AI.Body = agent; Debug.Log("SettingUP BasicMind: " + tree.name); mind.SetBehavior(tree, null); rainAI.WorkingMemory = memory; }
// Use this for initialization void Start() { audioEventName = defaultAudioEventName; AIRig aiRig = GetComponentInChildren<AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // récupération des composants RAIN endWaitTimer = (int)Random.Range(minEndWaitTimer, maxEndWaitTimer); // séléction aléatoire de la fin du timer d'attente }
void Start() { AIRig aiRig = GetComponentInChildren<AIRig>(); // récupération du composant RAIN tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // récupération de la mémoire RAIN startingFragment.GetComponent<levitation>().IsHeld(true); // désactivation de la lévitation du fragment avec lequel le guide commence startingFragment.GetComponent<InteractibleObject> ().OnTouch ();//rammassage du fragment de départ du guide PickUpObject(startingFragment);//idem }
// Use this for initialization public void Start() { AIRig aiRig = GetComponentInChildren<AIRig>(); tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory; // référence sur mémoire RAIN endSoundTimer = (int)Random.Range(minEndSoundTimer, maxEndSoundTimer); // initialisation aléatoire de timer endWaitTimer = (int)Random.Range(minEndWaitTimer, maxEndWaitTimer); }
// Use this for initialization public override void Start() { tMemory = AI.WorkingMemory as RAIN.Memory.BasicMemory; tMemory.RemoveItem("lookTarget"); }