public void Update() { transform.position += new Vector3(direction.x, direction.y, 0) * SPEED_CONSTANT * Time.smoothDeltaTime; this.transform.Rotate(0, 0, 1); Utility.ScreenWrap(this.transform); ServerUpdate(); }
void ServerUpdate() { Utility.ScreenWrap(this.transform); if (timeDestroy < DateTime.Now) { Destroy(this.gameObject); NetworkServer.Destroy(this.gameObject); } }