AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-04-17 22:21:00 (12 years 8 months ago)
Author:nathan@daedalus
Branch:axios-newgsm
Commit:1373ec33131c
Parents: f8c25203909a
Message:Updating more code

Changes:
Maxios/Engine/AxiosEvents.cs (1 diff)
Maxios/Engine/AxiosGameScreen.cs (2 diffs)
Maxios/ScreenSystem/GameScreen.cs (1 diff)
Maxios/ScreenSystem/InputHelper.cs (1 diff)
Maxios/ScreenSystem/LogoScreen.cs (1 diff)
Maxios/ScreenSystem/MainMenuScreen.cs (1 diff)
Maxios/ScreenSystem/PhoneMainMenuScreen.cs (1 diff)
Maxios/ScreenSystem/PhysicsGameScreen.cs (1 diff)
Maxios/ScreenSystem/ScreenManager.cs (4 diffs)

File differences

axios/Engine/AxiosEvents.cs
6969
7070
7171
72
72
7373
7474
7575
this.ScaleChanged(gameObject);
}
private void OnEvent(AxiosHandler e, AxiosGameScreen gameScreen, InputHelper input)
private void OnEvent(AxiosHandler e, AxiosGameScreen gameScreen, InputState input)
{
AxiosHandler handle = e;
if (handle != null)
axios/Engine/AxiosGameScreen.cs
334334
335335
336336
337
337
338338
339339
340340
......
345345
346346
347347
348
348
349349
350350
351351
}
}
public override void HandleInput(InputState input, GameTime gameTime)
public override void HandleInput(GameTime gameTime, InputState input)
{
base.HandleInput(input, gameTime);
g.HandleInput(this, input, gameTime);
}
public override void UnloadContent()
public override void Deactivate()
{
base.UnloadContent();
//AxiosLog.Instance.AddLine("Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);
axios/ScreenSystem/GameScreen.cs
3535
3636
3737
38
3839
3940
4041
/// </summary>
public abstract class GameScreen
{
protected bool HasCursor = false;
/// <summary>
/// Normally when one screen is brought up over the top of another,
/// the first screen will transition off to make room for the new
axios/ScreenSystem/InputHelper.cs
146146
147147
148148
149
149150
150151
151152
public void LoadContent()
{
_cursorSprite = new Sprite(_manager.Content.Load<Texture2D>("Common/cursor"));
#if WINDOWS_PHONE
// virtual stick content
axios/ScreenSystem/LogoScreen.cs
6262
6363
6464
65
66
65
66
6767
6868
6969
public override void HandleInput(GameTime gameTime, InputState input)
{
//input.
if (input.KeyboardState.GetPressedKeys().Length > 0 ||
input.GamePadState.IsButtonDown(Buttons.A | Buttons.Start | Buttons.Back) ||
if (input.CurrentKeyboardStates[0].GetPressedKeys().Length > 0 ||
input.CurrentGamePadStates[0].IsButtonDown(Buttons.A | Buttons.Start | Buttons.Back) ||
input.MouseState.LeftButton == ButtonState.Pressed)
{
_duration = TimeSpan.Zero;
axios/ScreenSystem/MainMenuScreen.cs
99
1010
1111
12
1213
1314
1415
#region Using Statements
using Microsoft.Xna.Framework;
using GameStateManagementSample;
#endregion
namespace GameStateManagement
axios/ScreenSystem/PhoneMainMenuScreen.cs
99
1010
1111
12
1213
1314
1415
using System;
using GameStateManagement;
using GameStateManagementSample;
using Microsoft.Xna.Framework;
namespace GameStateManagement
axios/ScreenSystem/PhysicsGameScreen.cs
7272
7373
7474
75
7576
7677
7778
7879
7980
80
81
8182
8283
8384
{
if (!Axios.Settings.ScreenSaver)
{
ContentManager man = new ContentManager(this.ScreenManager.Game.Services, "Content");
DebugView = new DebugViewXNA(World);
DebugView.RemoveFlags(DebugViewFlags.Shape);
DebugView.RemoveFlags(DebugViewFlags.Joint);
DebugView.DefaultShapeColor = Color.White;
DebugView.SleepingShapeColor = Color.LightGray;
DebugView.LoadContent(ScreenManager.GraphicsDevice, ScreenManager.Content);
DebugView.LoadContent(ScreenManager.GraphicsDevice, man);
}
}
axios/ScreenSystem/ScreenManager.cs
1818
1919
2020
21
2122
2223
2324
......
3738
3839
3940
40
41
4142
4243
4344
......
4748
4849
4950
51
52
53
54
55
5056
5157
5258
5359
5460
61
62
63
64
65
5566
5667
5768
......
107118
108119
109120
121
110122
111123
112124
using System.IO;
using System.IO.IsolatedStorage;
using System.Xml.Linq;
using FarseerPhysics.SamplesFramework;
#endregion
namespace GameStateManagement
List<GameScreen> screens = new List<GameScreen>();
List<GameScreen> tempScreensList = new List<GameScreen>();
InputState input = new InputState();
InputState input;
SpriteBatch spriteBatch;
SpriteFont font;
bool traceEnabled;
/// <summary>
/// Contains all the fonts avaliable for use.
/// </summary>
private SpriteFonts _spriteFonts;
#endregion
#region Properties
public SpriteFonts Fonts
{
get { return _spriteFonts; }
}
/// <summary>
/// A default SpriteBatch shared by all the screens. This saves
/// each screen having to bother creating their own local instance.
// we must set EnabledGestures before we can query for them, but
// we don't assume the game wants to read them.
TouchPanel.EnabledGestures = GestureType.None;
this.input = new InputState(this);
}

Archive Download the corresponding diff file

Page rendered in 1.03392s using 13 queries.