private void finishReleasingPlane() { for (int i = 0; i < activeArrestingWires.Count; i++) { arrestingWiresH[i] = 0; } activeArrestingWires.Clear(); planeBeingCaught = null; isReleasingPlane = false; }
private void activateClosestArrestingWires(PlaneView p) { float diff; for (int i = 0; i < arrestingWires.Count; i++) { diff = p.RearWheelInnerNode._getDerivedPosition().x - arrestingWires[i]._getDerivedPosition().x; if (Math.Abs(diff) < 0.5f && diff > 0 && !activeArrestingWires.Contains(arrestingWires[i])) { activeArrestingWires.Add(arrestingWires[i]); } } }
public void StartCatchingPlane(PlaneView plane, EndAircraftCarrierTile carrierTile) { isCatchingPlane = true; if (carrierTile == null) { activeArrestingWires.Clear(); activeArrestingWires.Add(arrestingWires[0]); } else { activateClosestArrestingWires(plane); } planeBeingCaught = plane; }
public bool DestoryStoragePlane(AircraftCarrierTile storageTile) { if (storagePlanes.Count == 0) { return(false); } PlaneView view = storagePlanes.Find(delegate(PlaneView pv) { return((pv.Plane as StoragePlane).Tile == storageTile); }); if (view == null) { return(false); } view.Smash(); // ustawia animation state na 'die' return(true); }
public bool RemoveNextStoragePlane() { if (storagePlanes.Count == 0) { return(false); } PlaneView view = storagePlanes[storagePlanes.Count - 1]; view.PlaneNode.SetVisible(false); if (EngineConfig.DisplayBoundingQuadrangles) { ViewHelper.DetachQuadrangles(sceneMgr, view.Plane); } storagePlanes.RemoveAt(storagePlanes.Count - 1); return(true); }
public void StartHangaringPlane(PlaneView plane, int hangaringDirection) { hangarPlane = plane; isHangaringPlane = true; this.hangaringDirection = hangaringDirection; }