AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-09-22 20:37:00 (12 years 2 months ago)
Author:Natalie Adams
Branch:default
Commit:0737379cc88f
Parents: fa778c206e78
Message:Adding visible property to SimpleDrawableAxiosGameObject

Changes:
Maxios/Engine/SimpleDrawableAxiosGameObject.cs (2 diffs)

File differences

axios/Engine/SimpleDrawableAxiosGameObject.cs
1919
2020
2121
22
23
24
25
26
27
28
2229
2330
2431
......
3845
3946
4047
41
42
43
44
45
46
47
48
49
50
48
49
50
51
52
53
54
55
56
57
58
59
5160
5261
5362
protected Boolean _adjustunits = true;
protected Boolean _relativetocamera = true;
protected int _draworder;
protected bool _visible = true;
public bool Visible
{
get { return _visible; }
set { this._visible = value; }
}
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)
DrawObject(gameScreen.ScreenManager.SpriteBatch, Texture, BodyPart, Origin, true, _scale);
else
DrawObject(gameScreen.ScreenManager.SpriteBatch, Texture, BodyPart, Origin, _scale);
gameScreen.ScreenManager.SpriteBatch.End();
if (_visible)
{
if (_relativetocamera)
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
else
gameScreen.ScreenManager.SpriteBatch.Begin();
if (_adjustunits)
DrawObject(gameScreen.ScreenManager.SpriteBatch, Texture, BodyPart, Origin, true, _scale);
else
DrawObject(gameScreen.ScreenManager.SpriteBatch, Texture, BodyPart, Origin, _scale);
gameScreen.ScreenManager.SpriteBatch.End();
}
}
protected void DrawObject(SpriteBatch sb, Texture2D texture, Body body, Vector2 origin)

Archive Download the corresponding diff file

Page rendered in 0.42751s using 14 queries.