27using Microsoft.Xna.Framework;
28using Microsoft.Xna.Framework.Graphics;
55 TopLeft =
new Vector2( 0.0f, 0.0f ),
56 TopRight =
new Vector2( 1.0f, 0.0f ),
57 BottomLeft =
new Vector2( 0.0f, 1.0f ),
58 BottomRight =
new Vector2( 1.0f, 1.0f ),
61#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
69#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
72#elif !DISABLE_LIGHTING_EFFECT
95#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
113 GraphicsAdapter adapter = GraphicsAdapter.DefaultAdapter;
114 SurfaceFormat format = adapter.CurrentDisplayMode.Format;
115 return DepthFormat.Depth24Stencil8;
148#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
152 effect.CurrentTechnique = effect.Techniques[
"TextureLighting"];
153 effect.Parameters[
"xTexture"].SetValue( texture );
161 effect.World = worldMatrix;
162 effect.Texture = texture;
169#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
173 effect.CurrentTechnique = effect.Techniques[
"ColorLighting"];
180 effect.World = worldMatrix;
185#if !WINDOWS_PHONE && !DISABLE_LIGHTING_EFFECT
190 Vector3 lightPos =
new Vector3( 0, 0, 40 );
191 float lightPower = 0.0f;
196 lightPos =
new Vector3( (
float)light.Position.X, (
float)light.Position.Y, (
float)light.Distance );
197 lightPower = (float)light.Intensity;
200 Vector3 transformedLightPos;
201 Vector3.Transform( ref lightPos, ref worldMatrix, out transformedLightPos );
204 effect.Parameters[
"xWorld"].SetValue( worldMatrix );
205 effect.Parameters[
"xLightPos"].SetValue( transformedLightPos );
206 effect.Parameters[
"xLightPower"].SetValue( lightPower );
218 new Vector3( 0.0f, 0.0f, 1.0f ),
System.Numerics.Vector2 Vector2
Level Level
Aktiivinen kenttä.
static new GraphicsDevice GraphicsDevice
XNA:n grafiikkakortti.
static bool SmoothTextures
Tekstuurien (kuvien) reunanpehmennys skaalattaessa (oletus päällä).
static List< Light > Lights
Valoefektit.
static Game Instance
Käynnissä olevan pelin pääolio.
static ScreenView Screen
Näytön dimensiot, eli koko ja reunat.
Contains graphics resources.
static LineBatch LineBatch
static DepthFormat SelectStencilMode()
static Matrix ProjectionMatrix
static void SetSamplerState()
static Effect LightingEffect
static Effect GetColorEffect(ref Matrix worldMatrix, bool lightingEnabled)
static ShapeBatch ShapeBatch
static bool is_PS_2_0_supported
static SpriteBatch SpriteBatch
static SamplerState storedSamplerState
static void ResetSamplerState()
static void GraphicsDevice_DeviceReset(object sender, EventArgs e)
static void ResetScreenSize()
static ImageBatch ImageBatch
static SamplerState GetDefaultSamplerState()
static Effect GetTextureEffect(ref Matrix worldMatrix, Texture2D texture, bool lightingEnabled)
static Matrix viewProjectionMatrix
static Effect GetLightingEffect(ref Matrix worldMatrix)
static BasicEffect BasicColorEffect
static BasicEffect BasicTextureEffect
static readonly TextureCoordinates DefaultTextureCoords
static FontStashSharp.Renderer FontRenderer
Draws images efficiently. Draw() calls should be made only between Begin() and End() calls....
double AmbientLight
Taustavalo
double Width
Näytön leveys x-suunnassa.
double Height
Näytön korkeus y-suunnassa.
Draws simple shapes efficiently. Draw() calls should be made only between Begin() and End() calls....
Microsoft.Xna.Framework.Matrix Matrix