// Use this for initialization void Start() { this.__direction = new Vector3(Random.Range(0.0f, 1.0f), 0, Random.Range(0.0f, 1.0f)).normalized; this.__transform = this.transform; this.__rigidbody = this.rigidbody; this.__npcFriend = null; this.__barFound = null; this.__stunTimer = new Timer(); this.__isHitten = false; this.__state = State.IDLE; this.__firstTimeInState = false; if (NPCCtrl.__mainCharacter == null) { NPCCtrl.__mainCharacter = GameObject.Find("MainCharacter"); NPCCtrl.__mainCharacterCtrl = NPCCtrl.__mainCharacter.GetComponent <MainCharacterCtrl>(); } }
// Use this for initialization void Start() { this.__direction = new Vector3(Random.Range(0.0f, 1.0f), 0, Random.Range(0.0f, 1.0f)).normalized; this.__transform = this.transform; this.__rigidbody = this.rigidbody; this.__npcFriend = null; this.__barFound = null; this.__stunTimer = new Timer(); this.__isHitten = false; this.__state = State.IDLE; this.__firstTimeInState = false; if ( NPCCtrl.__mainCharacter == null ) { NPCCtrl.__mainCharacter = GameObject.Find("MainCharacter"); NPCCtrl.__mainCharacterCtrl = NPCCtrl.__mainCharacter.GetComponent<MainCharacterCtrl>(); } }