// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "scene/SceneItemComponent.hpp" #include "scene/components/entity/EntityFaction.hpp" namespace Dawn { class EntitySwordAttack : public SceneItemComponent { protected: SceneItem *attackHitbox = nullptr; public: // @optional StateProperty attackTime; // @optional glm::vec3 attackOffset = glm::vec3(0, 0, 1); // @optional float_t swingTime = 0.5f; EntitySwordAttack(SceneItem* item); void onStart() override; void attack(); bool_t isAttacking(); }; }