// Use this for initialization void Awake() { movementTargetPosition = transform.position; //initializing our movement target as our current position bornPosition = transform.position; isAlive = true; deathTime = 0; trainingGround = GetComponentInParent <TrainingGround>(); randommove = GetRandomPosition(); rb = GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { ground = GetComponentInParent <TrainingGround>(); movementTargetPosition = transform.position; //initializing our movement target as our current position rayPer = GetComponent <ObjectPerception>(); //isAlive = true; // deathTime = 0; // trainingGround = GetComponentInParent<TrainingGround>(); randommove = EnemyController.GetRandomPosition(); rb = GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { cc = GetComponent <CharacterController>(); academy = GameObject.Find("Academy").GetComponent <NpcaiAcademy>(); rayPer = GetComponent <ObjectPerception>(); rayPer.player = this; lastEpisode = currentTime.Second; trainingGround = GetComponentInParent <TrainingGround>(); target = trainingGround.GetComponentInChildren <TreasureController>(); //target.gameObject.SetActive(false); agentRb = GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { cc = GetComponent <CharacterController>(); cc.enabled = false; academy = GameObject.Find("Academy").GetComponent <NpcaiAcademy>(); rayPer = GetComponent <ObjectPerception>(); rayPer.enemy = this; lastEpisode = Timer.time; trainingGround = GetComponentInParent <TrainingGround>(); isAlive = true; deathTime = 0; target = trainingGround.GetComponentInChildren <TreasureController>(); agentRb = GetComponent <Rigidbody>(); disToTarget = float.MaxValue; player = trainingGround.GetComponentInChildren <NpcAIAgent>(); }
// Use this for initialization void Start() { ground = GetComponentInParent <TrainingGround>(); }