?? player.h
字號:
/*************************************************************************** player.h - headers for the corresponding cpp file ------------------- copyright : (C) 2003 by Artur Hallmann, (C) 2003 by FluXy email : mail@arturh.com website : http://www.arturh.com ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __PLAYER_H__#define __PLAYER_H__#include "include/globals.h"/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */class cFireball : public cSprite
{public: cFireball(float x, float y, float velx); virtual ~cFireball(void); virtual cSprite* Clone( ); virtual void Update(void); bool bDestroy; SDL_Surface* img1; SDL_Surface* img2; int counter;};/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */class cPlayer : public cSprite
{public: cPlayer(float x, float y); virtual ~cPlayer(void); virtual cSprite* Clone( ); void Walk(float velwalk, float maxvel, float velwrongway); // lets the Player walk, this->direction sets the direction void Hold(void); // lets the Player hold in void Update(void); // updates everything, called every frame void DrawP(int imgnr); // draws the player with the imgnr ( see images[] ) void LoadImages(void); // loads the images depending on -> iSize void StartJump(double Power = 17.0,double Acc_up = 4.0,double vel_deAcc = 0.06); void JumpStep(void); // lets the Player jump void Debug(void); // some debug procedure void Die(void);
bool AdvancedCollision(cSprite *SpriteObj); // returns 1 on Player got owned else 0 int iSize; // MARIO_ + SMALL || BIG || SUPER -> Mario size bool debugmode; int invincible; void AddFireball(void); void DestroyFireballs(void); int walk_count; int state, lifes; SDL_Surface *images[15]; bool startjump,start_enemyjump;
double jump_Acc_up; // Acceleration if Up key is pressed
double jump_vel_deAcc; // Vely De Acceleration use 0.05 - 0.08. int level; void EnterNextLevel(void); void ReturnToPrevLevel (void); void LastLevelReached(void); void Reset(void); bool ducked; int goldpieces; long points; int jump_power; cFireball* fire1; cFireball* fire2; cFireball* fire3; cFireball* fire4;};/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -