Path: blob/master/SonicMania/Objects/CPZ/StickyPlatform.h
338 views
#ifndef OBJ_STICKYPLATFORM_H1#define OBJ_STICKYPLATFORM_H23#include "Game.h"45typedef enum {6STICKYPLATFORM_UP,7STICKYPLATFORM_DOWN,8STICKYPLATFORM_RIGHT,9STICKYPLATFORM_LEFT,10} StickyPlatformTypes;1112// Object Class13struct ObjectStickyPlatform {14RSDK_OBJECT15uint16 sfxLand;16uint16 aniFrames;17};1819// Entity Class20struct EntityStickyPlatform {21RSDK_ENTITY22StateMachine(state);23StickyPlatformTypes type;24Vector2 amplitude;25int32 speed;26bool32 oscillate;27int32 unused;28int32 activePlayers;29int32 playerTimer[PLAYER_COUNT];30Vector2 centerPos;31Hitbox hitbox;32Animator animator;33};3435// Object Struct36extern ObjectStickyPlatform *StickyPlatform;3738// Standard Entity Events39void StickyPlatform_Update(void);40void StickyPlatform_LateUpdate(void);41void StickyPlatform_StaticUpdate(void);42void StickyPlatform_Draw(void);43void StickyPlatform_Create(void *data);44void StickyPlatform_StageLoad(void);45#if GAME_INCLUDE_EDITOR46void StickyPlatform_EditorDraw(void);47void StickyPlatform_EditorLoad(void);48#endif49void StickyPlatform_Serialize(void);5051// Extra Entity Functions52void StickyPlatform_Interact(void);5354void StickyPlatform_State_HandleMovement(void);55void StickyPlatform_State_MoveBack(void);56void StickyPlatform_State_MoveBackForth(void);57void StickyPlatform_State_Oscillating(void);5859#endif //! OBJ_STICKYPLATFORM_H606162