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

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