void Awake() { attribute = GetComponent <NpcAttribute> (); //controller = GetComponent<CharacterController> (); myAnimationEvent = GetComponent <MyAnimationEvent> (); targetPlayer = null; }
//CharacterController controller; void Awake() { attribute = GetComponent <NpcAttribute> (); myAnimationEvent = GetComponent <MyAnimationEvent>(); //controller = GetComponent<CharacterController>(); animation.Play("idle"); animation ["idle"].wrapMode = WrapMode.Loop; //GetComponent<ShadowComponent> ().CreateShadowPlane (); }
//inside birth circle void Awake() { myAnimationEvent = GetComponent <MyAnimationEvent>(); _characterState = CharacterState.Idle; controller = GetComponent <CharacterController>(); heading = Random.Range(0, 360); transform.eulerAngles = new Vector3(0, heading, 0); StartCoroutine(NewHeading()); StartCoroutine(FindTarget()); //StartCoroutine(CheckOnHit()); }
void Awake() { animationEvent = GetComponent <MyAnimationEvent>(); allAttackAni = new List <string>() { "attack", "attack2" }; _characterState = CharacterState.Idle; moveDirection = transform.TransformDirection(Vector3.forward); }
void Awake() { attribute = GetComponent <NpcAttribute>(); myAnimationEvent = GetComponent <MyAnimationEvent>(); heading = Random.Range(0, 360); transform.eulerAngles = new Vector3(0, heading, 0); ai = new MonsterCharacter(); ai.attribute = attribute; ai.AddState(new MonsterIdle()); ai.AddState(new MonsterCombat()); ai.AddState(new MonsterDead()); ai.AddState(new MonsterFlee()); ai.AddState(new MonsterKnockBack()); ai.AddState(new MonsterSkill()); }
void Awake() { attribute = GetComponent <NpcAttribute>(); myAnimationEvent = GetComponent <MyAnimationEvent>(); heading = Random.Range(0, 360); transform.eulerAngles = new Vector3(0, heading, 0); ai = new MonsterCharacter(); ai.attribute = attribute; ai.AddState(new MonsterIdle()); ai.AddState(new MonsterCombat()); ai.AddState(new MonsterDead()); ai.AddState(new MonsterFlee()); ai.AddState(new MonsterKnockBack()); ai.AddState(new MonsterSkill()); this.regEvt = new System.Collections.Generic.List <MyEvent.EventType>() { MyEvent.EventType.WolfCall, }; RegEvent(); }
void Awake() { commonAI = GetComponent <CommonAI> (); animationEvent = GetComponent <MyAnimationEvent> (); }