Example #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];

            var localPlayer = self.World.LocalPlayer;
            devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null;
            ai = self.Owner.PlayerActor.TraitsImplementing<HackyAI>().FirstOrDefault(x => x.IsEnabled);
        }
Example #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);
        }