2dkg/2dkg_zad5/2dgk_zad5/KSettings.h
2022-01-20 14:07:29 +01:00

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