Axios-Tennis

Axios-Tennis Commit Details


Date:2012-11-21 00:30:00 (12 years 4 months ago)
Author:Natalie Adams
Branch:default
Commit:6fe30e201b0c
Parents: e0b99058d10d
Message:Adding console to Tennis screen

Changes:
Maxios_tennis/axios_tennis/Objects/Ball.cs (2 diffs)
Maxios_tennis/axios_tennis/TennisScreen.cs (3 diffs)

File differences

axios_tennis/axios_tennis/Objects/Ball.cs
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
......
7474
7575
7676
77
77
7878
7979
8080
        public Ball(Vector2 position)
        {
            this.Position = position;
            AllowAutomaticMouseJoint = true;
        }
        public override void LoadContent(AxiosGameScreen gameScreen)
        {
            base.LoadContent(gameScreen);
            this.ConstantVelocity = new Vector2(7f, 7f);
            this.ConstantVelocity = new Vector2(7f, 0f);
            this.Texture = gameScreen.ScreenManager.Game.Content.Load<Texture2D>("ball");
            this.Origin = new Vector2(this.Texture.Width / 2, this.Texture.Height / 2);
            this.BodyPart = BodyFactory.CreateCircle(gameScreen.World, ConvertUnits.ToSimUnits(this.Texture.Width / 2), 1f);
        public void ResetBall()
        {
            this.ApplyConstantVelocity = false;
            ConstantVelocity = new Vector2(7f, 7f);
            ConstantVelocity = new Vector2(7f, 0f);
            this.BodyPart.Position = Vector2.Zero;
            this.BodyPart.LinearVelocity = Vector2.Zero;
            BodyPart.AngularVelocity = 0f;
axios_tennis/axios_tennis/TennisScreen.cs
33
44
55
6
7
86
97
108
11
9
1210
1311
1412
13
1514
1615
1716
......
4342
4443
4544
45
4646
4747
4848
......
116116
117117
118118
119
119120
121
120122
121123
122124
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Axios.Engine.Extensions;
using Axios.Engine.UI;
using Axios;
using System;
using GameStateManagement;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Axios.Engine.UI;
namespace axios_tennis
{
#if WINDOWS
    class GameConsole : AxiosCommandConsole
    {
        public GameConsole(AxiosGameScreen gameScreen)
            base.LoadContent();
        }
    }
#endif
    class TennisScreen : AxiosGameScreen
    {
        private Ball _ball;
            AddGameObject(_ppaddle);
            AddGameObject(_border);
            AddGameObject(_ball);
#if WINDOWS
            AddGameObject(new GameConsole(this));
#endif
        }
        void b_MouseDown(object sender, AxiosGameScreen gameScreen, InputState input)

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.81413s using 14 queries.