Exemplo n.º 1
0
 private void finishReleasingPlane()
 {
     for (int i = 0; i < activeArrestingWires.Count; i++)
     {
         arrestingWiresH[i] = 0;
     }
     activeArrestingWires.Clear();
     planeBeingCaught = null;
     isReleasingPlane = false;
 }
Exemplo n.º 2
0
        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]);
                }
            }
        }
Exemplo n.º 3
0
 public void StartCatchingPlane(PlaneView plane, EndAircraftCarrierTile carrierTile)
 {
     isCatchingPlane = true;
     if (carrierTile == null)
     {
         activeArrestingWires.Clear();
         activeArrestingWires.Add(arrestingWires[0]);
     }
     else
     {
         activateClosestArrestingWires(plane);
     }
     planeBeingCaught = plane;
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 public void StartHangaringPlane(PlaneView plane, int hangaringDirection)
 {
     hangarPlane             = plane;
     isHangaringPlane        = true;
     this.hangaringDirection = hangaringDirection;
 }