12345678910111213141516171819202122232425262728293031 |
- /*
- * 2D Game Engine
- * Projectile.h:
- * Based on pikuma.com 2D game engine in C++ and Lua course
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 27/02/2021.
- */
- #ifndef GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_PROJECTILE_H
- #define GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_PROJECTILE_H
- #include <SDL.h>
- struct ProjectileComponent
- {
- uint32_t projectileDuration;
- uint32_t hitPercentDamage;
- bool isFriendly;
- uint32_t startTime;
- ProjectileComponent(uint32_t projectileDuration = 0,
- uint32_t hitPercentDamage = 0,
- bool isFriendly = false) : projectileDuration(projectileDuration),
- hitPercentDamage(hitPercentDamage),
- isFriendly(isFriendly)
- {
- this->startTime = SDL_GetTicks();
- }
- };
- #endif /* GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_PROJECTILE_H */
|