protected override void ReadyEnter() { base.ReadyEnter(); m_Power = 0; m_PrePos = Vector2.zero; transform.localPosition = Vector3.zero; transform.SetParent(null); MissilePath.ShowOrHidePath(false); }
protected override void ShootEnter() { base.ShootEnter(); m_TrailRenderer.enabled = true; MissilePath.ShowOrHideReference(false); MissilePath.ShowOrHidePath(false); m_TrajectoryTimer = 0; m_PathTimer = 0; m_Rigi.constraints = RigidbodyConstraints2D.FreezeRotation; m_Rigi.velocity = new Vector2(m_VerticalVelocity, m_VerticalEndVelocity); IsTrajectory = true; if (OnShoot != null) { OnShoot(); } }