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>(); GetComponent <Animation>().Play("idle"); GetComponent <Animation>() ["idle"].wrapMode = WrapMode.Loop; //GetComponent<ShadowComponent> ().CreateShadowPlane (); }
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> (); }