C# Class FSO.Client.Rendering.City.Terrain

Inheritance: FSO.Common.Rendering.Framework._3DAbstract
显示文件 Open project: RHY3756547/FreeSO Class Usage Examples

Public Properties

Property Type Description
Atlas Microsoft.Xna.Framework.Graphics.Texture2D
MASK_COLORS uint[]
RegenData bool
Shader2D Microsoft.Xna.Framework.Graphics.Effect
ShadowRes int
ShadowsEnabled bool
m_GraphicsDevice GraphicsDevice
m_Roads Microsoft.Xna.Framework.Graphics.Texture2D[]
m_ZoomProgress float
m_Zoomed bool

Public Methods

Method Description
Add ( _3DComponent item ) : void
ClearOldData ( ) : void
CreateRoadAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D input, SpriteBatch spriteBatch ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateTextureAtlas ( SpriteBatch spriteBatch ) : void

Creates a texture atlas with which to texture the terrain.

CreateTransparencyAtlas ( SpriteBatch spriteBatch ) : void

Creates a transparency atlas with which to texture the terrain.

DeviceReset ( GraphicsDevice Device ) : void
Draw ( GraphicsDevice gfx ) : void
Draw2DPoly ( ) : void
DrawTooltip ( SpriteBatch batch, string tooltip, Vector2 position, float opacity ) : void

Draws a tooltip at the specified coordinates.

GenerateAssets ( ) : void
GenerateCityMesh ( GraphicsDevice GfxDevice ) : void
GetElements ( ) : List<_3DComponent>
Initialize ( String CityName, CityDataRetriever cityData ) : void
LoadContent ( GraphicsDevice GfxDevice ) : void
SetTimeOfDay ( double time ) : void
Terrain ( GraphicsDevice Device ) : System
UIMouseEvent ( String type ) : void
UnloadEverything ( ) : void
Update ( UpdateState state ) : void
populateCityLookup ( LotTileEntry TileData ) : void
transformSpr ( float iScale, Vector3 pos ) : Vector2

Private Methods

Method Description
BuyPropertyAlert_OnButtonClick ( UIElement Button ) : void

Player selected "yes" to buy a new lot.

CalculateR ( Vector2 m ) : Vector2
Controller_OnLotCost ( LotTileEntry Entry ) : void
Controller_OnLotPurchaseFailed ( Network e ) : void
Controller_OnLotPurchaseSuccessful ( int Money ) : void
Controller_OnLotUnbuildable ( ) : void
ConvertToBinaryArray ( Color ColorArray ) : byte[]
DrawDepth ( Effect VertexShader, Effect PixelShader ) : Microsoft.Xna.Framework.Graphics.Texture2D
DrawHouses ( float HB ) : void
DrawLine ( Microsoft.Xna.Framework.Graphics.Texture2D Fill, Vector2 Start, Vector2 End, SpriteBatch spriteBatch, int lineWidth, float opacity ) : void
DrawSpotlights ( float HB ) : void
DrawSprites ( float HB, float VB ) : void
DrawTileBorders ( float iScale, SpriteBatch spriteBatch ) : void
FixedTimeUpdate ( ) : void
GetBlend ( Color TerrainTypeData, int i, int j ) : Blend
GetHoverSquare ( ) : int[]
IsInsidePoly ( double Poly, double Pos ) : bool
LoadTex ( Stream stream ) : Microsoft.Xna.Framework.Graphics.Texture2D
LoadTex ( string Path ) : Microsoft.Xna.Framework.Graphics.Texture2D
PathTile ( int x, int y, float iScale, float opacity ) : void
ToBinaryString ( int Array ) : string
ZeroPad ( string Str, int NumZeroes ) : string
drawBorderSide ( Vector2 xy, Vector2 xy2, Vector2 xy3, Vector2 xy4, SpriteBatch spriteBatch, float opacity ) : void
drawPartLine ( Vector2 xy, Vector2 xy2, SpriteBatch spriteBatch, float opacity ) : void
drawTileCorner ( Vector2 xy, Vector2 xy2, Vector2 xy3, SpriteBatch spriteBatch, float opacity ) : void
isLandBuildable ( int x, int y ) : bool
m_PacketTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
populateCityLookup ( ) : void

Method Details

Add() public method

public Add ( _3DComponent item ) : void
item FSO.Common.Rendering.Framework._3DComponent
return void

ClearOldData() public method

public ClearOldData ( ) : void
return void

CreateRoadAtlas() public method

public CreateRoadAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D input, SpriteBatch spriteBatch ) : Microsoft.Xna.Framework.Graphics.Texture2D
input Microsoft.Xna.Framework.Graphics.Texture2D
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateTextureAtlas() public method

Creates a texture atlas with which to texture the terrain.
public CreateTextureAtlas ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A spritebatch to draw with.
return void

CreateTransparencyAtlas() public method

Creates a transparency atlas with which to texture the terrain.
public CreateTransparencyAtlas ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A spritebatch to draw with.
return void

DeviceReset() public method

public DeviceReset ( GraphicsDevice Device ) : void
Device GraphicsDevice
return void

Draw() public method

public Draw ( GraphicsDevice gfx ) : void
gfx GraphicsDevice
return void

Draw2DPoly() public method

public Draw2DPoly ( ) : void
return void

DrawTooltip() public method

Draws a tooltip at the specified coordinates.
public DrawTooltip ( SpriteBatch batch, string tooltip, Vector2 position, float opacity ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance.
tooltip string String to be drawn.
position Vector2 Position of tooltip.
opacity float Tooltip's opacity.
return void

GenerateAssets() public method

public GenerateAssets ( ) : void
return void

GenerateCityMesh() public method

public GenerateCityMesh ( GraphicsDevice GfxDevice ) : void
GfxDevice GraphicsDevice
return void

GetElements() public method

public GetElements ( ) : List<_3DComponent>
return List<_3DComponent>

Initialize() public method

public Initialize ( String CityName, CityDataRetriever cityData ) : void
CityName String
cityData CityDataRetriever
return void

LoadContent() public method

public LoadContent ( GraphicsDevice GfxDevice ) : void
GfxDevice GraphicsDevice
return void

SetTimeOfDay() public method

public SetTimeOfDay ( double time ) : void
time double
return void

Terrain() public method

public Terrain ( GraphicsDevice Device ) : System
Device GraphicsDevice
return System

UIMouseEvent() public method

public UIMouseEvent ( String type ) : void
type String
return void

UnloadEverything() public method

public UnloadEverything ( ) : void
return void

Update() public method

public Update ( UpdateState state ) : void
state FSO.Common.Rendering.Framework.Model.UpdateState
return void

populateCityLookup() public method

public populateCityLookup ( LotTileEntry TileData ) : void
TileData LotTileEntry
return void

transformSpr() public method

public transformSpr ( float iScale, Vector3 pos ) : Vector2
iScale float
pos Vector3
return Vector2

Property Details

Atlas public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics Atlas
return Microsoft.Xna.Framework.Graphics.Texture2D

MASK_COLORS public_oe static_oe property

public static uint[] MASK_COLORS
return uint[]

RegenData public_oe property

public bool RegenData
return bool

Shader2D public_oe property

public Effect,Microsoft.Xna.Framework.Graphics Shader2D
return Microsoft.Xna.Framework.Graphics.Effect

ShadowRes public_oe property

public int ShadowRes
return int

ShadowsEnabled public_oe property

public bool ShadowsEnabled
return bool

m_GraphicsDevice public_oe property

public GraphicsDevice m_GraphicsDevice
return GraphicsDevice

m_Roads public_oe property

public Texture2D[],Microsoft.Xna.Framework.Graphics m_Roads
return Microsoft.Xna.Framework.Graphics.Texture2D[]

m_ZoomProgress public_oe property

public float m_ZoomProgress
return float

m_Zoomed public_oe property

public bool m_Zoomed
return bool