//构造 public UnitInfo(string index, float recoverSpeed, float Time_recover, int maxDValue, int type, Vector3 pos, string rotation) { Index = index; this.recoverSpeed = recoverSpeed; this.Time_recover = Time_recover; this.MaxDValue = maxDValue; this.type = type; this.pos = pos; this.rotation = rotation; dele_updateBehavious += Update; }
//销毁 public void Destroy() { dele_updateBehavious -= Update; }