예제 #1
0
파일: Employe.cs 프로젝트: hartbit/Hatarake
    void Awake()
    {
        AIRig aiRig = GetComponentInChildren <AIRig>();

        tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory;
        tSens   = aiRig.AI.Senses as RAIN.Perception.BasicSenses;
    }
예제 #2
0
    void Awake()
    {
        AIRig aiRig = GetComponentInChildren <AIRig>();

        tMemory = aiRig.AI.WorkingMemory as RAIN.Memory.BasicMemory;
        tNav    = aiRig.AI.Navigator as RAIN.Navigation.BasicNavigator;
    }
예제 #3
0
    //[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);
        }
    }
예제 #4
0
    // 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"));
    }
예제 #5
0
    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>();
    }
예제 #6
0
    // 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
    }
예제 #7
0
    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
    }
예제 #8
0
    // 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);
    }
예제 #9
0
        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;
        }
예제 #10
0
 // 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
 }
예제 #11
0
 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
 }
예제 #12
0
    // 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);
    }
예제 #13
0
 // Use this for initialization
 public override void Start()
 {
     tMemory = AI.WorkingMemory as RAIN.Memory.BasicMemory;
     tMemory.RemoveItem("lookTarget");
 }