📄 invasion.h
字号:
#ifndef INVASION_H
#define INVASION_H
#include "Chloride.h"
#include "ChlorideLevel.h"
#include "WorldObject.h"
using namespace llamaworks2d;
class invasion : public game
{
public:
invasion();
bool OnAppLoad();
bool InitGame();
bool InitLevel();
bool UpdateFrame();
bool RenderFrame();
ATTACH_MESSAGE_MAP;
bool OnKeyDown(
keyboard_input_message &theMessage);
void GetKeyboardInput();
void CollisionCheck(
world_object &movingObject);
void WorldToScreen(
vectorf &worldPos, vector &screenPos);
void SetCamera(
float worldX);
chloride *TheCaptain();
void AddWorldObject( world_object *object);
private:
chloride theCaptain;
chloride_level currentLevel;
sound backgroundMusic;
// The amount added to the world X coordinate
// needed to produce the correct screen coordinate.
int worldToScreenX;
int worldToScreenY;
// Contains all things in the world that move or
// that can be picked up. Excludes the background.
// Includes Captain Chloride. Needs to be reset
// every time the level is loaded.
// This is the head of a linked list. Consider using
// the Standard Template Library "list" container.
world_object* worldObjects;
};
inline chloride*
invasion::TheCaptain()
{
return (&theCaptain);
}
inline void
invasion::AddWorldObject( world_object *object)
{
object->next = worldObjects;
worldObjects = object;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -