/// <summary> /// 移动 /// </summary> void Move() { if (_ContactTanks.Count > 0) { _ContactTanks.Clear(); } this._Statu = TankStatu.MOVING; transform.Translate(Vector3.forward * Time.deltaTime * _MoveSpeed); }
/// <summary> /// 停止,一般就是卡住了 /// </summary> void Contact(GameObject tank) { this._Statu = TankStatu.STOPED; this._IsContact = true; if (!IsInvoking("SmokeUp") && !_Smoke.emit) { this.Invoke("SmokeUp", 1); } if (!_ContactTanks.Contains(tank)) { this._ContactTanks.Add(tank); } }