Add weapons
This commit is contained in:
@@ -60,12 +60,13 @@ typedef BzSpatialGridID SpatialGridID;
|
||||
extern ECS_COMPONENT_DECLARE(SpatialGridID);
|
||||
|
||||
typedef Vector2 Position, Size, Velocity, TargetPosition, Steering;
|
||||
typedef f32 Rotation;
|
||||
typedef f32 Rotation, Orientation;
|
||||
|
||||
extern ECS_COMPONENT_DECLARE(Position);
|
||||
extern ECS_COMPONENT_DECLARE(Size);
|
||||
extern ECS_COMPONENT_DECLARE(Velocity);
|
||||
extern ECS_COMPONENT_DECLARE(Rotation);
|
||||
extern ECS_COMPONENT_DECLARE(Orientation);
|
||||
extern ECS_COMPONENT_DECLARE(Steering);
|
||||
extern ECS_COMPONENT_DECLARE(TargetPosition);
|
||||
|
||||
@@ -152,20 +153,31 @@ typedef struct EntityArms {
|
||||
* Gameplay components
|
||||
*********************************************************/
|
||||
|
||||
typedef Vector2 ItemOffset;
|
||||
|
||||
typedef struct WeaponMelee {
|
||||
|
||||
ecs_entity_t weapon;
|
||||
f32 reach;
|
||||
f32 damage;
|
||||
f32 speed;
|
||||
} WeaponMelee;
|
||||
typedef struct WeaponRanged {
|
||||
|
||||
ecs_entity_t weapon;
|
||||
int32_t ammo;
|
||||
} WeaponRanged;
|
||||
typedef struct WeaponShield {
|
||||
|
||||
ecs_entity_t weapon;
|
||||
} WeaponShield;
|
||||
typedef struct AttachedWeapons {
|
||||
typedef struct Arms {
|
||||
ecs_entity_t primary;
|
||||
ecs_entity_t secondary;
|
||||
} AttachedWeapons;
|
||||
} Arms;
|
||||
extern ECS_COMPONENT_DECLARE(Arms);
|
||||
typedef struct Arm {
|
||||
f32 offset;
|
||||
f32 extended;
|
||||
} Arm;
|
||||
extern ECS_COMPONENT_DECLARE(Arm);
|
||||
|
||||
extern ECS_COMPONENT_DECLARE(UnitAction);
|
||||
extern ECS_COMPONENT_DECLARE(UnitAI);
|
||||
|
||||
Reference in New Issue
Block a user