예제 #1
0
 void Awake()
 {
     attribute = GetComponent <NpcAttribute> ();
     //controller = GetComponent<CharacterController> ();
     myAnimationEvent = GetComponent <MyAnimationEvent> ();
     targetPlayer     = null;
 }
예제 #2
0
        //CharacterController controller;

        void Awake()
        {
            attribute        = GetComponent <NpcAttribute> ();
            myAnimationEvent = GetComponent <MyAnimationEvent>();
            //controller = GetComponent<CharacterController>();
            animation.Play("idle");
            animation ["idle"].wrapMode = WrapMode.Loop;
            //GetComponent<ShadowComponent> ().CreateShadowPlane ();
        }
예제 #3
0
        //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());
        }
예제 #4
0
        void Awake()
        {
            animationEvent = GetComponent <MyAnimationEvent>();

            allAttackAni = new List <string>()
            {
                "attack", "attack2"
            };

            _characterState = CharacterState.Idle;
            moveDirection   = transform.TransformDirection(Vector3.forward);
        }
예제 #5
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());
        }
예제 #6
0
파일: LangAI.cs 프로젝트: itcodes/unityRpg
        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();
        }
예제 #7
0
 void Awake()
 {
     commonAI       = GetComponent <CommonAI> ();
     animationEvent = GetComponent <MyAnimationEvent> ();
 }