Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CFpsMoveCamera Class Reference

The object class supports camera movement with arrow keys. More...

#include <Camera/CFpsMoveCamera.h>

Inheritance diagram for Skylicht::CFpsMoveCamera:
Skylicht::CComponentSystem Skylicht::IActivatorObject Skylicht::CEditorMoveCamera

Classes

struct  SKeyMap
 Mapping between a direction and a keyboard key. More...

Public Types

enum  EMoveDirection {
  MoveForward = 0 , MoveBackward , StrafeLeft , StrafeRight ,
  DirectionCount
}
 Directions for FPS-style movement.

Public Member Functions

virtual void initComponent ()
virtual void updateComponent ()
virtual void endUpdate ()
 Updates the camera position based on input state. Called at the end of the frame.
virtual bool OnEvent (const SEvent &event)
void setKeyMap (const std::vector< SKeyMap > &keyMap)
 Sets a custom key map for movement.
void setMoveSpeed (float s)
 Sets the movement speed.
Public Member Functions inherited from Skylicht::CComponentSystem
const char * getName ()
virtual void reset ()
virtual void startComponent ()
virtual void onEnable (bool b)
virtual void onUpdateCullingLayer (u32 mask)
virtual CObjectSerializablecreateSerializable ()
virtual void loadSerializable (CObjectSerializable *object)
void setEnable (bool b)
bool isEnable ()
CGameObject * getGameObject ()
void setEnableSerializable (bool b)
bool isSerializable ()
void addLinkComponent (CComponentSystem *comp)
void removeAllLink ()
Public Member Functions inherited from Skylicht::IActivatorObject
virtual ~IActivatorObject ()
 Virtual destructor for polymorphic activator objects.

Protected Attributes

CCameram_camera
 Pointer to the CCamera component.
std::vector< SKeyMapm_keyMap
 List of key mappings for movement.
bool m_input [DirectionCount]
 Array tracking the pressed state of each move direction.
f32 m_moveSpeed
 Movement speed multiplier.
Protected Attributes inherited from Skylicht::CComponentSystem
CGameObject * m_gameObject
bool m_enable
bool m_serializable
std::vector< CComponentSystem * > m_linkComponent

Additional Inherited Members

Static Public Member Functions inherited from Skylicht::CComponentSystem
static int useComponent (CComponentSystem *used)
Protected Member Functions inherited from Skylicht::CComponentSystem
void setOwner (CGameObject *obj)

Detailed Description

The object class supports camera movement with arrow keys.

Member Function Documentation

◆ endUpdate()

virtual void Skylicht::CFpsMoveCamera::endUpdate ( )
virtual

Updates the camera position based on input state. Called at the end of the frame.

Reimplemented from Skylicht::CComponentSystem.

◆ initComponent()

virtual void Skylicht::CFpsMoveCamera::initComponent ( )
virtual

◆ setKeyMap()

void Skylicht::CFpsMoveCamera::setKeyMap ( const std::vector< SKeyMap > & keyMap)
inline

Sets a custom key map for movement.

Parameters
keyMapVector of SKeyMap structures.

◆ setMoveSpeed()

void Skylicht::CFpsMoveCamera::setMoveSpeed ( float s)
inline

Sets the movement speed.

Parameters
sSpeed value.

◆ updateComponent()

virtual void Skylicht::CFpsMoveCamera::updateComponent ( )
virtual

The documentation for this class was generated from the following file: