/
GameObject.cs
53 lines (41 loc) · 1.36 KB
/
GameObject.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX;
using SharpDX.Toolkit;
using Windows.UI.Input;
using Windows.UI.Core;
namespace Project
{
using SharpDX.Toolkit.Graphics;
public enum GameObjectType
{
None, Player, EastWall, SouthWall
}
// Super class for all game objects.
abstract public class GameObject
{
public GameController game;
public GameObjectType type = GameObjectType.None;
public Vector3 pos;
public BasicEffect basicEffect;
public VertexInputLayout inputLayout;
public Effect effect;
public abstract void Update(GameTime gametime);
public abstract void Draw(GameTime gametime);
// These virtual voids allow any object that extends GameObject to respond to tapped and manipulation events
public virtual void Tapped(GestureRecognizer sender, TappedEventArgs args)
{
}
public virtual void OnManipulationStarted(GestureRecognizer sender, ManipulationStartedEventArgs args)
{
}
public virtual void OnManipulationUpdated(GestureRecognizer sender, ManipulationUpdatedEventArgs args)
{
}
public virtual void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
{
}
}
}