Ejemplo n.º 1
0
        public Aircraft( ActorInitializer init , AircraftInfo info)
        {
            this.self = init.self;
            if( init.Contains<LocationInit>() )
                this.SubPxPosition = 1024 * Util.CenterOfCell( init.Get<LocationInit, int2>() );

            this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit,int>() : info.InitialFacing;
            this.Altitude = init.Contains<AltitudeInit>() ? init.Get<AltitudeInit,int>() : 0;
            Info = info;
        }
Ejemplo n.º 2
0
        public Aircraft(ActorInitializer init, AircraftInfo info)
        {
            this.self = init.self;
            if (init.Contains <LocationInit>())
            {
                this.SubPxPosition = 1024 * Util.CenterOfCell(init.Get <LocationInit, int2>());
            }

            this.Facing   = init.Contains <FacingInit>() ? init.Get <FacingInit, int>() : info.InitialFacing;
            this.Altitude = init.Contains <AltitudeInit>() ? init.Get <AltitudeInit, int>() : 0;
            Info          = info;
        }
Ejemplo n.º 3
0
        public Aircraft(ActorInitializer init, AircraftInfo info)
        {
            this.info = info;
            this.self = init.self;

            if (init.Contains <LocationInit>())
            {
                SetPosition(self, init.Get <LocationInit, CPos>());
            }

            if (init.Contains <CenterPositionInit>())
            {
                SetPosition(self, init.Get <CenterPositionInit, WPos>());
            }

            Facing = init.Contains <FacingInit>() ? init.Get <FacingInit, int>() : info.InitialFacing;
        }
Ejemplo n.º 4
0
        public Aircraft(ActorInitializer init, AircraftInfo info)
        {
            this.info = info;
            this.self = init.self;

            if (init.Contains <LocationInit>())
            {
                SetPosition(self, init.Get <LocationInit, CPos>());
            }

            this.Facing = init.Contains <FacingInit>() ? init.Get <FacingInit, int>() : info.InitialFacing;

            if (init.Contains <AltitudeInit>())
            {
                var z = init.Get <AltitudeInit, int>() * 1024 / Game.CellSize;
                SetPosition(self, CenterPosition + new WVec(0, 0, z - CenterPosition.Z));
            }
        }
Ejemplo n.º 5
0
 public AircraftMoveOrderTargeter(AircraftInfo info)
 {
     this.info = info;
 }