void Awake() { Represent = gameObject.AddComponent <NpcRepresent>(); State = gameObject.AddMissingComponent <NpcState>(); State.Init(this); IsDead = false; }
protected NpcBaseState(Npc npc) { Owner = npc; Animator = Owner.gameObject.GetComponent <NpcRepresent>(); Rigidbody = Owner.gameObject.GetComponent <Rigidbody2D>(); }