-
Notifications
You must be signed in to change notification settings - Fork 0
/
MovableElement.cs
52 lines (47 loc) · 1.98 KB
/
MovableElement.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
using System;
using Mogre;
namespace RaceGame
{
/// <summary>
/// This abstract class inherits form the GameElement class and contains methods and parameters necessary
/// to move and animate a movable element in the game
/// </summary>
abstract class MovableElement : GameElement
{
protected bool remove; // This fields determines wheter the movable element is to be removed from the game
/// <summary>
/// Read only. This property returns whether this movable element is to be removed from the game
/// </summary>
public bool RemoveMe
{
get { return remove; }
}
/// <summary>
/// Constructor
/// </summary>
public MovableElement()
{
isMovable = true;
}
/// <summary>
/// This virtual method is to contain the translation of the movable element in the given direction
/// </summary>
/// <param name="direction">Direction along which move the movable element</param>
virtual public void Move(Vector3 direction)
{ }
/// <summary>
/// This virtual method is to contain the rotation the movable element by the given quaternion in the specified transform space
/// </summary>
/// <param name="quaternion">Quaternion which describes axis and rotation angle</param>
/// <param name="transformSpace">Space on which apply the rotation, local by default</param>
virtual public void Rotate(Quaternion quaternion,
Node.TransformSpace transformSpace = Node.TransformSpace.TS_LOCAL)
{ }
/// <summary>
/// This virtual method is to contain the animation description of the movable element
/// </summary>
/// <param name="evt">A frame event which can be used to tune the animation timings</param>
virtual public void Animate(FrameEvent evt)
{ }
}
}