Path: blob/master/SonicMania/Objects/UFO/UFO_Sphere.h
338 views
#ifndef OBJ_UFO_SPHERE_H1#define OBJ_UFO_SPHERE_H23#include "Game.h"45typedef enum {6UFO_SPHERE_BLUE,7UFO_SPHERE_RED,8UFO_SPHERE_MINE,9UFO_SPHERE_SPIKES,10} UFO_SphereTypes;1112typedef enum {13UFO_SPHERE_B_NONE,14UFO_SPHERE_B_BOUNCE,15UFO_SPHERE_B_MOVE,16} UFO_SphereBehaviours;1718// Object Class19struct ObjectUFO_Sphere {20RSDK_OBJECT21int32 unused;22TABLE(int32 defaultHeights[4], { 12, 12, 16, 16 });23uint16 aniFrames;24uint16 sfxMachSpeed;25uint16 sfxLedgeBreak;26};2728// Entity Class29struct EntityUFO_Sphere {30RSDK_ENTITY31StateMachine(state);32int32 type;33int32 behavior;34int32 height;35int32 speed;36Vector2 matAngle;37Vector2 amplitude;38int32 timer;39int32 startHeight;40Vector2 startPos;41Vector2 worldPos;42Vector2 drawPos;43int32 scaleFactor;44Matrix matrix;45Matrix matrix2;46Animator animator;47};4849// Object Struct50extern ObjectUFO_Sphere *UFO_Sphere;5152// Standard Entity Events53void UFO_Sphere_Update(void);54void UFO_Sphere_LateUpdate(void);55void UFO_Sphere_StaticUpdate(void);56void UFO_Sphere_Draw(void);57void UFO_Sphere_Create(void *data);58void UFO_Sphere_StageLoad(void);59#if GAME_INCLUDE_EDITOR60void UFO_Sphere_EditorDraw(void);61void UFO_Sphere_EditorLoad(void);62#endif63void UFO_Sphere_Serialize(void);6465// Extra Entity Functions66void UFO_Sphere_State_Fixed(void);67void UFO_Sphere_State_Bouncing(void);68void UFO_Sphere_State_Moving(void);69void UFO_Sphere_State_Collected(void);70void UFO_Sphere_State_HandleRespawn(void);71void UFO_Sphere_State_AnimateAndDestroy(void);7273#endif //! OBJ_UFO_SPHERE_H747576