public virtual void Init(int id, FieldMonster sc) { Script = sc; stateDic.Add(AIState_Base.Idle, new AIState_Idle(this)); stateDic.Add(AIState_Base.Attack, new AIState_Attack(this)); CurrState = stateDic[AIState_Base.Idle]; }
private void RemoveObject(FieldMonster obj) { if (monsterList.Contains(obj)) { monsterList.Remove(obj); DestroyImmediate(obj.gameObject); } else { Debug.LogError("obj error"); return; } }