Rhythm
Game Engines Final Project
Loading...
Searching...
No Matches
keyboard_input.d File Reference

Handles keyboard input for game objects. More...

import bindbc.sdl;

Functions

mOwner. components::keyboard_input::GetComponent (ComponentType.TEXTURE).SetPosition(100
 
collision. components::keyboard_input::OnTouch ((GameObject *self, GameObject *other) { if(other.GetName()=="block") { if(state[SDL_SCANCODE_F]) { mOwner.GetScene().RemoveGameObject(other.GetID());} } })
 
else components::keyboard_input::if (state[SDL_SCANCODE_J])
 

Variables

mOwner.auto components::keyboard_input::collision = mOwner.GetComponent!(ComponentType.COLLISION_RECT)
 
 components::keyboard_input::else
 Pointer to the owning GameObject.
 
bool components::keyboard_input::mIsJumping = false
 Tracks if the object is currently jumping.
 
double components::keyboard_input::mJumpStartTime = 0.0
 Time when the jump started.
 
double components::keyboard_input::mJumpDuration = 1.0
 Duration of the jump in seconds.
 
double components::keyboard_input::mCurrentTime = 0.0
 Current time.
 

Detailed Description

Handles keyboard input for game objects.

Variable Documentation

◆ else

components::keyboard_input::else
Initial value:
{
}
}
private:
GameObject* mOwner
Represents a game object within a scene.
Definition gameobject.d:20

Pointer to the owning GameObject.