axiosengine 

axiosengine Commit Details


Date:2012-09-22 14:19:45 (12 years 2 months ago)
Author:Natalie Adams
Branch:master
Commit:d73c59bcce44718a70f41e10e0eb130fb09b0e7d
Parents: 4c7c9e6d6186217a7233be39293d44369d2c84c4
Message:* - Adding visible flag to DrawableAxiosGameObject

Changes:

File differences

axios/Axios_settings.cs
115115
116116
117117
118
118119
119120
120121
* 1.0.1.7 - 7/22/2012
* - Adding Factory for Texture2D to create from a list (ie lay a list of texture2D row by row)
* - Adding AddScreen method to ScreenManager to make the PlayerIndex optional (default of PlayerIndex.One)
* - Adding visible flag to DrawableAxiosGameObject
*
*/
#endregion
axios/Engine/AxiosGameScreen.cs
217217
218218
219219
220
221220
221
222222
223223
224224
public override void Draw(GameTime gameTime)
{
//System.Diagnostics.Debugger.Break();
if (Level != null)
{
foreach (Layer layer in Level.Layers)
axios/Engine/DrawableAxiosGameObject.cs
33
44
55
6
67
78
89
......
1011
1112
1213
14
1315
1416
1517
18
19
20
21
22
23
1624
1725
1826
1927
2028
29
2130
2231
2332
......
7887
7988
8089
81
82
83
84
85
86
87
88
89
90
90
91
92
93
94
95
96
97
98
99
100
101
102
103
91104
92105
93106
using FarseerPhysics.SamplesFramework;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Diagnostics;
namespace Axios.Engine
{
{
protected int _draworder;
protected Texture2D Texture;
protected bool _visible = true;
//public Vector2 Position = new Vector2(); //set this to a property and adjust if adjustunits is true
public bool Visible
{
get { return _visible; }
set { this._visible = value; }
}
public Vector2 _position = Vector2.Zero;
public Vector2 Position
{
get
{
//Debugger.Break();
return ConvertUnits.ToDisplayUnits(_position);
}
set
public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime)
{
if (_relativetocamera)
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
else
gameScreen.ScreenManager.SpriteBatch.Begin();
if (_adjustunits)
gameScreen.ScreenManager.SpriteBatch.Draw(Texture, ConvertUnits.ToDisplayUnits(_position), null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0);
else
gameScreen.ScreenManager.SpriteBatch.Draw(Texture, _position, null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0);
gameScreen.ScreenManager.SpriteBatch.End();
//System.Diagnostics.Debugger.Break();
//Vector2 test = ConvertUnits.ToDisplayUnits(_position);
if (_visible)
{
if (_relativetocamera)
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
else
gameScreen.ScreenManager.SpriteBatch.Begin();
if (_adjustunits)
gameScreen.ScreenManager.SpriteBatch.Draw(Texture, ConvertUnits.ToDisplayUnits(_position), null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0);
else
gameScreen.ScreenManager.SpriteBatch.Draw(Texture, _position, null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0);
gameScreen.ScreenManager.SpriteBatch.End();
}
}
public int DrawOrder

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06022s using 14 queries.