Path: blob/master/SonicMania/Objects/CPZ/Ball.h
338 views
#ifndef OBJ_BALL_H1#define OBJ_BALL_H23#include "Game.h"45typedef enum {6BALL_SINGLE,7BALL_SPAWN_LEFT,8BALL_SPAWN_UP,9BALL_SPAWN_RIGHT,10BALL_SPAWN_DOWN,11} BallTypes;1213// Object Class14struct ObjectBall {15RSDK_OBJECT16Hitbox hitboxBall;17Hitbox hitboxRange;18uint16 aniFrames;19uint16 sfxSplash;20};2122// Entity Class23struct EntityBall {24RSDK_ENTITY25StateMachine(state);26uint8 type;27EntityPlayer *targetPlayer;28Vector2 startPos;29Animator animator;30};3132// Object Entity33extern ObjectBall *Ball;3435// Standard Entity Events36void Ball_Update(void);37void Ball_LateUpdate(void);38void Ball_StaticUpdate(void);39void Ball_Draw(void);40void Ball_Create(void *data);41void Ball_StageLoad(void);42#if GAME_INCLUDE_EDITOR43void Ball_EditorDraw(void);44void Ball_EditorLoad(void);45#endif46void Ball_Serialize(void);4748// Extra Entity Functions49void Ball_DebugSpawn(void);50void Ball_DebugDraw(void);5152void Ball_HandleInteractions(void);53void Ball_CheckOffScreen(void);54void Ball_SpawnSplashes(void);5556void Ball_State_Init(void);57void Ball_State_AwaitPlayer(void);58void Ball_State_TargetingPlayer(void);59void Ball_State_ChemicalDrop(void);60void Ball_State_Splash(void);61void Ball_State_StraightMovement(void);62void Ball_State_Spawner(void);6364#endif //! OBJ_BALL_H656667