// Copyright (c) 2023 Alex Diener. All rights reserved. #ifndef __EntityComponent_pushable_H__ #define __EntityComponent_pushable_H__ typedef struct EntityComponent_pushable EntityComponent_pushable; #define EntityComponent_pushable_superclass GameEntityComponent #include "gamemath/Vector2i.h" #include "PROJECT_NAME/GameEntityComponent.h" #define EntityComponent_pushable_ivars \ GameEntityComponent_ivars \ \ bool multipush; \ bool pushed; #define EntityComponent_pushable_vtable(self_type) \ GameEntityComponent_vtable(self_type) \ \ bool (* push)(self_type * self, struct GameEntity * entity, struct GameEntity * pushingEntity, Vector2i direction); stemobject_declare(EntityComponent_pushable) EntityComponent_pushable * EntityComponent_pushable_create(bool multipush); bool EntityComponent_pushable_init(EntityComponent_pushable * self, bool multipush); void EntityComponent_pushable_dispose(EntityComponent_pushable * self); void EntityComponent_pushable_initCopy(EntityComponent_pushable * self, compat_type(GameEntityComponent *) original); void EntityComponent_pushable_update(EntityComponent_pushable * self, struct GameEntity * entity); bool EntityComponent_pushable_push(EntityComponent_pushable * self, struct GameEntity * entity, struct GameEntity * pushingEntity, Vector2i direction); #endif