Beispiel #1
0
        void Awake()
        {
            Represent = gameObject.AddComponent <NpcRepresent>();
            State     = gameObject.AddMissingComponent <NpcState>();
            State.Init(this);

            IsDead = false;
        }
Beispiel #2
0
 protected NpcBaseState(Npc npc)
 {
     Owner     = npc;
     Animator  = Owner.gameObject.GetComponent <NpcRepresent>();
     Rigidbody = Owner.gameObject.GetComponent <Rigidbody2D>();
 }