38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
#pragma once
|
|
#include "Property.h"
|
|
|
|
namespace KapitanGame
|
|
{
|
|
class KSettings final
|
|
{
|
|
float MaxJumpHeightValue;
|
|
float HorizontalDistanceToMaxJumpHeightValue;
|
|
float TimeToMaxHeightValue;
|
|
float GravityValue;
|
|
float JumpInitialVelocityValue;
|
|
float ShortJumpVelocityValue;
|
|
bool CollisionEnabledValue;
|
|
bool Dirty;
|
|
|
|
public:
|
|
|
|
KSettings(float maxJumpHeight, float horizontalDistanceToMaxJumpHeight);
|
|
const Property<float, KSettings> MaxJumpHeight, HorizontalDistanceToMaxJumpHeight;
|
|
const ReadOnlyProperty<float, KSettings> TimeToMaxHeight, Gravity, JumpInitialVelocity, ShortJumpVelocity;
|
|
const Property<bool, KSettings> CollisionEnabled;
|
|
|
|
private:
|
|
void SetCollisionEnabled(bool value);
|
|
void SetMaxJumpHeight(float h);
|
|
void SetHorizontalDistanceToMaxJumpHeight(float xn);
|
|
bool GetCollisionEnabled();
|
|
float GetTimeToMaxHeight();
|
|
float GetGravity();
|
|
float GetJumpInitialVelocity();
|
|
float GetShortJumpVelocity();
|
|
float GetMaxJumpHeight();
|
|
float GetHorizontalDistanceToMaxJumpHeight();
|
|
};
|
|
}
|
|
|