예제 #1
0
파일: Carryall.cs 프로젝트: hadow/Commander
        public Carryall(Actor self,CarryallInfo info)
        {
            Info = info;

            Carryable = null;

            State = CarryallState.Idle;

            aircraftInfo = self.Info.TraitInfoOrDefault<AircraftInfo>();
            body = self.Trait<BodyOrientation>();
            move = self.Trait<IMove>();
            facing = self.Trait<IFacing>();
        }
예제 #2
0
        public Aircraft(ActorInitializer init, AircraftInfo info)
        {
            Info = info;
            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;
        }
예제 #3
0
 public ReturnOnIdle(Actor self, ReturnOnIdleInfo info)
 {
     aircraftInfo = self.Info.TraitInfo <AircraftInfo>();
 }
예제 #4
0
 public AttackPlane(Actor self, AttackPlaneInfo info) : base(self, info)
 {
     AttackPlaneInfo = info;
     aircraftInfo    = self.Info.TraitInfo <AircraftInfo>();
 }