Example #1
0
 void Awake()
 {
     attribute = GetComponent <NpcAttribute> ();
     //controller = GetComponent<CharacterController> ();
     myAnimationEvent = GetComponent <MyAnimationEvent> ();
     targetPlayer     = null;
 }
Example #2
0
        //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 ();
        }
Example #3
0
        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());
        }
Example #4
0
        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();
        }
Example #5
0
 void Awake()
 {
     commonAI       = GetComponent <CommonAI> ();
     animationEvent = GetComponent <MyAnimationEvent> ();
 }