Path: blob/master/SonicMania/Objects/GHZ/Newtron.h
338 views
#ifndef OBJ_NEWTRON_H1#define OBJ_NEWTRON_H23#include "Game.h"45typedef enum {6NEWTRON_SHOOT,7NEWTRON_FLY,8NEWTRON_PROJECTILE,9} NewtronTypes;1011// Object Class12struct ObjectNewtron {13RSDK_OBJECT14Hitbox hitboxShoot;15Hitbox hitboxFly; // not sure why isn't this used in this object... GHZ/CheckerBall uses it though16Hitbox hitboxProjectile;17Hitbox hitboxRange;18uint16 aniFrames;19};2021// Entity Class22struct EntityNewtron {23RSDK_ENTITY24StateMachine(state);25uint8 type;26int32 timer;27Vector2 startPos;28Animator animator;29Animator flameAnimator;30};3132// Object Struct33extern ObjectNewtron *Newtron;3435// Standard Entity Events36void Newtron_Update(void);37void Newtron_LateUpdate(void);38void Newtron_StaticUpdate(void);39void Newtron_Draw(void);40void Newtron_Create(void *data);41void Newtron_StageLoad(void);42#if GAME_INCLUDE_EDITOR43void Newtron_EditorDraw(void);44void Newtron_EditorLoad(void);45#endif46void Newtron_Serialize(void);4748// Extra Entity Functions49void Newtron_DebugDraw(void);50void Newtron_DebugSpawn(void);5152// Helpers53void Newtron_CheckPlayerCollisions(void);54void Newtron_CheckOffScreen(void);55void Newtron_GetTargetDir(void);5657// States58void Newtron_State_Init(void);59void Newtron_State_CheckPlayerInRange(void);60void Newtron_State_Appear(void);61void Newtron_State_StartFly(void);62void Newtron_State_Fly(void);6364void Newtron_State_Shoot(void);65void Newtron_State_FadeAway(void);6667void Newtron_State_Projectile(void);6869#endif //! OBJ_NEWTRON_H707172