Path: blob/master/SonicMania/Objects/SSZ/BouncePlant.h
338 views
#ifndef OBJ_BOUNCEPLANT_H1#define OBJ_BOUNCEPLANT_H23#include "Game.h"45#define BOUNCEPLANT_NODE_COUNT (8)67// Object Class8struct ObjectBouncePlant {9RSDK_OBJECT10Hitbox hitbox;11uint16 aniFrames;12uint16 sfxBouncePlant;13};1415// Entity Class16struct EntityBouncePlant {17RSDK_ENTITY18StateMachine(state);19int32 recoilDuration;20Vector2 drawPos[BOUNCEPLANT_NODE_COUNT];21Vector2 nodeStartPos[BOUNCEPLANT_NODE_COUNT];22int32 recoilVelocity[BOUNCEPLANT_NODE_COUNT];23Vector2 stoodPos;24bool32 stood;25bool32 instantRecoil;26int32 depression;27int32 centerX;28Animator nodeAnimator;29Animator decorAnimators[BOUNCEPLANT_NODE_COUNT];30};3132// Object Struct33extern ObjectBouncePlant *BouncePlant;3435// Standard Entity Events36void BouncePlant_Update(void);37void BouncePlant_LateUpdate(void);38void BouncePlant_StaticUpdate(void);39void BouncePlant_Draw(void);40void BouncePlant_Create(void *data);41void BouncePlant_StageLoad(void);42#if GAME_INCLUDE_EDITOR43void BouncePlant_EditorDraw(void);44void BouncePlant_EditorLoad(void);45#endif46void BouncePlant_Serialize(void);4748// Extra Entity Functions49void BoucePlant_SetupNodePositions(void);50int32 BoucePlant_GetNodeStandY(int32 x);51int32 BoucePlant_GetNodeY(int32 x);5253#endif //! OBJ_BOUNCEPLANT_H545556