private void KillTargets() { if (!(m_missileLauncher is DreamCheeky)) { MessageBox.Show("Error! DreamCheeky launcher has not been selected!"); } else { if (SelectedTarget == null) { MessageBox.Show("Error! No Targets were selected!"); } else { if (SelectedTarget.Target.IsFriend) { MessageBox.Show("Error! Friendly fire is not permited!"); } else { double x, y, z, theta, phi; x = SelectedTarget.Target.X; y = SelectedTarget.Target.Y; z = SelectedTarget.Target.Z; theta = TargetPositioning.CalculateTheta(x, y, z); phi = TargetPositioning.CalculatePhi(x, y); //m_missileLauncher.MoveTo(0,0); m_missileLauncher.MoveTo((phi * 22.2), (theta * 22.2)); GetPosition(); Fire(); SelectedTarget.Target.IsAlive = false; } } } }
protected void UpdateStringOrientationAttributes(bool refresh = false) { Dictionary <string, bool> propertyStates = new Dictionary <string, bool>(1) { { "StringOrientation", TargetPositioning.Equals(TargetPositioningType.Strings) } }; SetBrowsable(propertyStates); if (refresh) { TypeDescriptor.Refresh(this); } }