Path: blob/master/SonicMania/Objects/LRZ/KingAttack.h
338 views
#ifndef OBJ_KINGATTACK_H1#define OBJ_KINGATTACK_H23#include "Game.h"45typedef enum {6KINGATTACK_LASER,7KINGATTACK_LASERBLAST,8KINGATTACK_ORBIT,9KINGATTACK_TRAIL,10KINGATTACK_LARGEBULLET,11KINGATTACK_ENERGYLINE,12KINGATTACK_SMALLBULLET,13} KingAttackTypes;1415// Object Class16struct ObjectKingAttack {17RSDK_OBJECT18TABLE(int32 laserColors[8], { 0x000020, 0x000020, 0xE850D8, 0xE850D8, 0xE850D8, 0xE850D8, 0x000020, 0x000020 });19uint16 aniFrames;20uint16 sfxLaserSweep;21uint16 sfxLaserErupt;22uint16 sfxElecPulse;23uint16 sfxTwinShot;24bool32 laserEruptActive;25};2627// Entity Class28struct EntityKingAttack {29RSDK_ENTITY30StateMachine(state);31int32 type;32int32 timer;33Entity *parent;34Vector2 targetPos;35Vector2 targetVelocity;36Vector2 laserVertPostions[8];37int32 *laserColors;38Hitbox hitbox;39Animator animator;40};4142// Object Struct43extern ObjectKingAttack *KingAttack;4445// Standard Entity Events46void KingAttack_Update(void);47void KingAttack_LateUpdate(void);48void KingAttack_StaticUpdate(void);49void KingAttack_Draw(void);50void KingAttack_Create(void *data);51void KingAttack_StageLoad(void);52#if GAME_INCLUDE_EDITOR53void KingAttack_EditorDraw(void);54void KingAttack_EditorLoad(void);55#endif56void KingAttack_Serialize(void);5758// Extra Entity Functions59bool32 KingAttack_SfxCheck_ElecIdle(void);60void KingAttack_CheckPlayerCollisions(void);61void KingAttack_HandleLaserPositions(void);6263void KingAttack_State_Laser(void);64void KingAttack_State_LaserBlast_Delay(void);65void KingAttack_State_LaserBlast_Erupt(void);66void KingAttack_State_OrbitAppear(void);67void KingAttack_State_Orbiting(void);68void KingAttack_State_OrbitLaunched(void);69void KingAttack_State_Trail(void);70void KingAttack_State_LargeBullet_Appear(void);71void KingAttack_State_EnergyLine(void);72void KingAttack_State_LargeBullet_TwinShot(void);73void KingAttack_State_SmallBullet(void);74void KingAttack_State_SmallBullet_Impact(void);7576#endif //! OBJ_KINGATTACK_H777879