예제 #1
0
        public RenderDebugState(Actor self, RenderDebugStateInfo info)
        {
            var buildingInfo = self.Info.TraitInfoOrDefault <BuildingInfo>();
            var yOffset      = buildingInfo == null ? 1 : buildingInfo.Dimensions.Y;

            offset = new WVec(0, 512 * yOffset, 0);

            this.self = self;
            color     = GetColor();
            font      = Game.Renderer.Fonts[info.Font];

            debugVis = self.World.WorldActor.TraitOrDefault <DebugVisualizations>();
        }
예제 #2
0
        public RenderDebugState(Actor self, RenderDebugStateInfo info)
        {
            var buildingInfo = self.Info.TraitInfoOrDefault<BuildingInfo>();
            var yOffset = buildingInfo == null ? 1 : buildingInfo.Dimensions.Y;
            offset = new WVec(0, 512 * yOffset, 0);

            this.self = self;
            color = GetColor();
            font = Game.Renderer.Fonts[info.Font];

            var localPlayer = self.World.LocalPlayer;
            devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null;
            ai = self.Owner.PlayerActor.TraitsImplementing<HackyAI>().FirstOrDefault(x => x.IsEnabled);
        }
예제 #3
0
        public RenderDebugState(Actor self, RenderDebugStateInfo info)
        {
            var buildingInfo = self.Info.TraitInfoOrDefault <BuildingInfo>();
            var yOffset      = buildingInfo == null ? 1 : buildingInfo.Dimensions.Y;

            offset = new WVec(0, 512 * yOffset, 0);

            this.self = self;
            color     = GetColor();
            font      = Game.Renderer.Fonts[info.Font];

            debugVis = self.World.WorldActor.TraitOrDefault <DebugVisualizations>();
            ai       = self.Owner.PlayerActor.TraitsImplementing <HackyAI>().FirstOrDefault(x => x.IsEnabled);
        }
예제 #4
0
        public RenderDebugState(Actor self, RenderDebugStateInfo info)
        {
            var buildingInfo = self.Info.TraitInfoOrDefault <BuildingInfo>();
            var yOffset      = buildingInfo == null ? 1 : buildingInfo.Dimensions.Y;

            offset = new WVec(0, 512 * yOffset, 0);

            this.self = self;
            color     = GetColor();
            font      = Game.Renderer.Fonts[info.Font];

            var localPlayer = self.World.LocalPlayer;

            devMode = localPlayer != null?localPlayer.PlayerActor.Trait <DeveloperMode>() : null;

            ai = self.Owner.PlayerActor.TraitsImplementing <HackyAI>().FirstOrDefault(x => x.IsEnabled);
        }