private void Awake() { attribute = GetComponent <NpcAttribute>(); ai = new TowerCharacter(); ai.attribute = attribute; ai.AddState(new TowerIdle()); ai.AddState(new TowerAttack()); ai.AddState(new TowerDead()); }