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

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