Public Member Functions | |
| Avatar (SceneObject sceneObj) | |
| We also want to be able to build one from a SceneObject. | |
| void | MoveTo (Vector3 desiredDestination) |
| Call this method to indicate to the Avatar who want it to move to the specified location. | |
| void | StopMoving () |
| Well name of the method is quite explicit. No argument needed :). | |
| void | FrameMove (float elapsedTime) |
| We use that function to update the Avatar on a regular basis. In the base class this is only used to move the Avatar at the speed specified by the speed member variable to the destination indicated by destination member, all this happen if the currentState of the Avatar is moving. If instead the current state is resting then this method doesn't perform anything in fact ! The base Avatar class is not so interesting for movements. The Avatar will only go to its destination whatever it may be. It will attempt to do so by flying !! In fact for any specific situation this class will most probably be overriden. For example we could have biped, quadriped, plane, car classes deriving from Avatar ! So on top of moving the Avatar this FrameMove method could also trigger the appropriate animation. | |
| Avatar (SceneObject sceneObj) | |
| We also want to be able to build one from a SceneObject. | |
| void | MoveTo (Vector3 desiredDestination) |
| Call this method to indicate to the Avatar who want it to move to the specified location. | |
| void | StopMoving () |
| Well name of the method is quite explicit. No argument needed :). | |
| void | FrameMove (float elapsedTime) |
| We use that function to update the Avatar on a regular basis. In the base class this is only used to move the Avatar at the speed specified by the speed member variable to the destination indicated by destination member, all this happen if the currentState of the Avatar is moving. If instead the current state is resting then this method doesn't perform anything in fact ! The base Avatar class is not so interesting for movements. The Avatar will only go to its destination whatever it may be. It will attempt to do so by flying !! In fact for any specific situation this class will most probably be overriden. For example we could have biped, quadriped, plane, car classes deriving from Avatar ! So on top of moving the Avatar this FrameMove method could also trigger the appropriate animation. | |
Public Attributes | |
| float | speed = 1.0f |
| The base avatar class will implement a basic move to functionnality. If you call the MoveTo method on an avatar he will remember its destination and move to reach that point of 3D space at the below speed. | |
| Vector3 | destination |
| We need to keep track of where we want to go. | |
| AvatarState | currentState = AvatarState.Resting |
| Our current state. It is important to know in some function if we are still moving or not for example. Derived Avatar class might have a lot of additional different state. | |
| SceneObject | associatedSceneObject = null |
| An Avatar needs to be attached to a sceneObject if you want it to be visible. | |
Definition at line 19 of file Avatar.cs.
| DXGfxLib.Avatar.Avatar | ( | SceneObject | sceneObj | ) |
| DXGfxLib.Avatar.Avatar | ( | SceneObject | sceneObj | ) |
| void DXGfxLib.Avatar.FrameMove | ( | float | elapsedTime | ) |
We use that function to update the Avatar on a regular basis. In the base class this is only used to move the Avatar at the speed specified by the speed member variable to the destination indicated by destination member, all this happen if the currentState of the Avatar is moving. If instead the current state is resting then this method doesn't perform anything in fact ! The base Avatar class is not so interesting for movements. The Avatar will only go to its destination whatever it may be. It will attempt to do so by flying !! In fact for any specific situation this class will most probably be overriden. For example we could have biped, quadriped, plane, car classes deriving from Avatar ! So on top of moving the Avatar this FrameMove method could also trigger the appropriate animation.
| elapsedTime |
Definition at line 99 of file Avatar.cs.
| void DXGfxLib.Avatar.FrameMove | ( | float | elapsedTime | ) |
We use that function to update the Avatar on a regular basis. In the base class this is only used to move the Avatar at the speed specified by the speed member variable to the destination indicated by destination member, all this happen if the currentState of the Avatar is moving. If instead the current state is resting then this method doesn't perform anything in fact ! The base Avatar class is not so interesting for movements. The Avatar will only go to its destination whatever it may be. It will attempt to do so by flying !! In fact for any specific situation this class will most probably be overriden. For example we could have biped, quadriped, plane, car classes deriving from Avatar ! So on top of moving the Avatar this FrameMove method could also trigger the appropriate animation.
| elapsedTime |
Definition at line 99 of file Avatar.cs.
| void DXGfxLib.Avatar.MoveTo | ( | Vector3 | desiredDestination | ) |
| void DXGfxLib.Avatar.MoveTo | ( | Vector3 | desiredDestination | ) |
| void DXGfxLib.Avatar.StopMoving | ( | ) |
| void DXGfxLib.Avatar.StopMoving | ( | ) |
| AvatarState DXGfxLib.Avatar::currentState = AvatarState.Resting |
| Vector3 DXGfxLib.Avatar::destination |
| float DXGfxLib.Avatar::speed = 1.0f |
1.5.8