Code: Select all
// need to decrement y, as coordinate system increases from top to bottom
void PlayerMoveUp(PlayerData *player)
{
player->y -= 1;
}
What are some absolute screamers you've managed?
Code: Select all
// need to decrement y, as coordinate system increases from top to bottom
void PlayerMoveUp(PlayerData *player)
{
player->y -= 1;
}
Code: Select all
a1toa2()
{
this->x = 2;
}
a2toa3()
{
this->x = 3;
}
Code: Select all
if (car1.active) {
car1.move();
}
if (car2.active) {
car2.move();
}
if (car3.active) {
car3.move();
}
Code: Select all
if enemy1x > playerx then dec enemy1x
if enemy2x > playerx then dec enemy2x
...
...
Code: Select all
class MiniApp: public csApplicationFramework, public csBaseEventHandler
{
private:
csRef<iEngine> silnik;
csRef<iVirtualClock> zegar;
csRef<iGraphics3D> g3d;
csRef<iKeyboardDriver> kbd;
csRef<iLoader> loader;
csRef<iCollideSystem> collsys;
csRef<iView> pwidz;
csRef<iVFS> FileSystem;
csColliderActor collider;
iSector* pokoj;
Character* current_character;
const char *mapa;
const char *folder;
int CameraType;
//prywatne metody
void ProcessFrame();
void FinishFrame();
bool LoadMap();
void CameraControl();
public:
iCameraPosition* kamera;
MiniApp();
~MiniApp();
void OnExit();
bool OnInitialize(int argc, char* argv[]);
bool Application();
bool OnKeyboard(iEvent& ev);
CS_EVENTHANDLER_NAMES("application.MiniApp")
//ponizsze funkcje NIE ZOSTALY ODZIEDZICZONE PO ZADNEJ KLASIE!
Character* BuildCharacterMesh(const char* factory_path,csVector3 pozycja, bool IsCurrent);
void SetFolder(const char *dir);
void SetMap(const char *map);
const char* GetMap()
{
return mapa;
}
void SetCameraType(int type)
{
CameraType=type;
}
int GetCameraType()
{
return CameraType;
}
csRef<Character> GetCurrentCharacter()
{
return current_character;
}
void SetCurrentCharacter(Character* character)
{
current_character=character;
}
bool Jump(const char *dir, const char *map);
//CS_EVENTHANDLER_NIL_CONSTRAINSTS;
};