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>(); }
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); }
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); }
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); }