axiosengine 

axiosengine Commit Details


Date:2013-01-02 17:45:08 (11 years 11 months ago)
Author:Natalie Adams
Branch:master
Commit:719b450343a9192d8baed2bae86d46743ca9200d
Parents: 1b5f1bfaf95a36642c249daeac79d7446cbb63d8
Message:Adding MouseAimVector to AGS Removing Camera extension

Changes:

File differences

axios/Axios_settings.cs
117117
118118
119119
120
120121
121122
122123
* - Adding AddScreen method to ScreenManager to make the PlayerIndex optional (default of PlayerIndex.One)
* - Adding visible flag to DrawableAxiosGameObject and SimpleDrawableAxiosGameObject
* - Adding extension to mousestate (Position) to get a Vector2 object of the position
* - Added MouseAimVector to AGS - this allows you to get a vector to "shoot" with (realtive to the mouse and another object) a LinearVelocity in Farseer
*
*/
#endregion
axios/Engine/AxiosGameScreen.cs
1111
1212
1313
14
1415
16
1517
1618
1719
......
6668
6769
6870
71
72
73
74
75
76
77
78
6979
7080
7181
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using GameStateManagement;
using Microsoft.Xna.Framework.Input;
using Axios.Engine.Gleed2D;
using Axios.Engine.Extensions;
namespace Axios.Engine
{
}
public Vector2 MouseAimVector(MouseState ms, Vector2 relativeposition)
{
Vector2 ret;
ret = this.Camera.ConvertScreenToWorld(ms.Position()) - relativeposition;
ret.Normalize();
return ret;
}
/*public void AddGameObject<T>(T gameobject)
{
if (gameobject is AxiosGameObject || gameobject is AxiosUIObject)
axios/Engine/Extensions/Camera.cs
1
2
3
4
5
6
7
8
9
10
11
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Axios.Engine.Extensions
{
public static class Camera
{
}
}

Archive Download the corresponding diff file

Branches

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