2dkg/2dkg_zad5/2dgk_zad5/KSettings.h

49 lines
1.3 KiB
C
Raw Permalink Normal View History

2022-01-20 08:52:14 +01:00
#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;
2022-01-20 14:07:29 +01:00
float BgPrl0Value;
float BgPrl1Value;
float BgPrl2Value;
2022-01-20 08:52:14 +01:00
public:
KSettings(float maxJumpHeight, float horizontalDistanceToMaxJumpHeight);
2022-01-20 14:07:29 +01:00
const Property<float, KSettings> MaxJumpHeight, HorizontalDistanceToMaxJumpHeight, BgPrl0, BgPrl1, BgPrl2;
2022-01-20 08:52:14 +01:00
const ReadOnlyProperty<float, KSettings> TimeToMaxHeight, Gravity, JumpInitialVelocity, ShortJumpVelocity;
const Property<bool, KSettings> CollisionEnabled;
2022-01-20 14:07:29 +01:00
float GetBgPrl(int i);
2022-01-20 08:52:14 +01:00
private:
void SetCollisionEnabled(bool value);
void SetMaxJumpHeight(float h);
2022-01-20 14:07:29 +01:00
void SetBgPrl0(float prl);
void SetBgPrl1(float prl);
void SetBgPrl2(float prl);
2022-01-20 08:52:14 +01:00
void SetHorizontalDistanceToMaxJumpHeight(float xn);
bool GetCollisionEnabled();
float GetTimeToMaxHeight();
float GetGravity();
2022-01-20 14:07:29 +01:00
float GetBgPrl0();
float GetBgPrl1();
float GetBgPrl2();
2022-01-20 08:52:14 +01:00
float GetJumpInitialVelocity();
float GetShortJumpVelocity();
float GetMaxJumpHeight();
float GetHorizontalDistanceToMaxJumpHeight();
2022-01-20 14:07:29 +01:00
2022-01-20 08:52:14 +01:00
};
}