private void ArmMine() { part.vessel.DiscoveryInfo.SetLevel(DiscoveryLevels.Unowned); mine = GetMine(); armMine = true; deployed = true; mine.ArmAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); string _proximity_ = Convert.ToString(proximity); }
IEnumerator DetonateMineRoutine() { detonating = true; mine = GetMine(); mine.ArmAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); AddForce(); yield return(new WaitForFixedUpdate()); mine.DetonateAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); part.explode(); }
IEnumerator DetonateMineRoutine() { detonating = true; UnityEngine.Debug.Log("[OrX Bonus Ball] Waldo Attack " + this.vessel.vesselName + " Detonating ... "); mine = GetMine(); mine.ArmAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); yield return(new WaitForFixedUpdate()); mine.DetonateAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); part.explode(); }
IEnumerator ArmMine() { checkIfArmed = false; yield return(new WaitForSeconds(1f)); mine = GetMine(); if (part.vessel.Splashed) { armMine = true; deployed = true; mine.ArmAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); } else { checkIfArmed = true; } }
////////////////////////////////////////////////////////////////////////// IEnumerator ArmMine() { part.vessel.DiscoveryInfo.SetLevel(DiscoveryLevels.Unowned); checkIfArmed = false; yield return(new WaitForSeconds(1f)); mine = GetMine(); if (part.vessel.altitude <= 0 || part.vessel.altitude == 0) { armMine = true; deployed = true; part.vessel.DiscoveryInfo.SetLevel(DiscoveryLevels.Unowned); mine.ArmAG(new KSPActionParam(KSPActionGroup.None, KSPActionType.Activate)); } else { checkIfArmed = true; } }