From 679d1ccb3a65db7058238c648113c83f7147958d Mon Sep 17 00:00:00 2001 From: tyanmahou Date: Sat, 14 Dec 2024 09:58:31 +0900 Subject: [PATCH] update CaptainTako --- .../app/components/Actor/Enemy/CaptainTako/Builder.cpp | 4 ++-- .../Actor/Enemy/CaptainTako/State/AttackState.cpp | 4 ++-- Re-Abyss/app/params/Actor/Enemy/CaptainTako/Param.hpp | 6 ++---- .../app/views/Actor/Enemy/CaptainTako/CpatainTakoVM.cpp | 7 +++---- .../resources/params/Actor/Enemy/CaptainTako/Param.toml | 1 - 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Re-Abyss/app/components/Actor/Enemy/CaptainTako/Builder.cpp b/Re-Abyss/app/components/Actor/Enemy/CaptainTako/Builder.cpp index 71418e532..6921e0397 100644 --- a/Re-Abyss/app/components/Actor/Enemy/CaptainTako/Builder.cpp +++ b/Re-Abyss/app/components/Actor/Enemy/CaptainTako/Builder.cpp @@ -21,10 +21,10 @@ namespace abyss::Actor::Enemy::CaptainTako { // 共通ビルド CommonBuilder::Build(pActor, BuildOption{} - .setInitPos(entity.pos) + .setInitPos(entity.footPos) .setForward(entity.forward) + .setBodyAnchor(BodyAnchor::BottomCenter) .setBodySize(Param::Base::Size) - .setBodyOffset(Param::Base::Pivot) .setInitHp(Param::Base::Hp) .setInitState() .setVModelPresenter(pActor) diff --git a/Re-Abyss/app/components/Actor/Enemy/CaptainTako/State/AttackState.cpp b/Re-Abyss/app/components/Actor/Enemy/CaptainTako/State/AttackState.cpp index 1a3564e77..1266f81ea 100644 --- a/Re-Abyss/app/components/Actor/Enemy/CaptainTako/State/AttackState.cpp +++ b/Re-Abyss/app/components/Actor/Enemy/CaptainTako/State/AttackState.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -23,7 +23,7 @@ namespace abyss::Actor::Enemy::CaptainTako while (true) { // ショット - constexpr s3d::Vec2 offset{ -9, 4 }; + constexpr s3d::Vec2 offset{ -9, -20 + 4 }; const s3d::Vec2 fixedOffset{ m_body->isForward(Forward::Left()) ? offset.x : -offset.x, offset.y diff --git a/Re-Abyss/app/params/Actor/Enemy/CaptainTako/Param.hpp b/Re-Abyss/app/params/Actor/Enemy/CaptainTako/Param.hpp index 5cc0adcbc..e9998312d 100644 --- a/Re-Abyss/app/params/Actor/Enemy/CaptainTako/Param.hpp +++ b/Re-Abyss/app/params/Actor/Enemy/CaptainTako/Param.hpp @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include @@ -8,12 +8,10 @@ namespace abyss::Actor::Enemy::CaptainTako { [[TOML_BIND(Base::Hp, "Base.hp")]] [[TOML_BIND(Base::Size, "Base.size")]] - [[TOML_BIND(Base::Pivot, "Base.pivot")]] struct Base { inline static s3d::int32 Hp{ 10 }; inline static s3d::Vec2 Size{ 32, 38 }; - inline static s3d::Vec2 Pivot{ 0, 1 }; }; [[TOML_BIND(Wait::TimeSec, "Wait.timeSec")]] @@ -44,4 +42,4 @@ namespace abyss::Actor::Enemy::CaptainTako inline static double ChargingAddScale{ 0.4 }; }; }; -} \ No newline at end of file +} diff --git a/Re-Abyss/app/views/Actor/Enemy/CaptainTako/CpatainTakoVM.cpp b/Re-Abyss/app/views/Actor/Enemy/CaptainTako/CpatainTakoVM.cpp index 42509eb62..d1c913b42 100644 --- a/Re-Abyss/app/views/Actor/Enemy/CaptainTako/CpatainTakoVM.cpp +++ b/Re-Abyss/app/views/Actor/Enemy/CaptainTako/CpatainTakoVM.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -50,7 +50,7 @@ namespace abyss::Actor::Enemy::CaptainTako bool isRight = m_forward.isRight(); int32 page = static_cast(Periodic::Triangle0_1(Param::View::AnimeTimeSec, m_time) * 3.0); auto tex = m_texture(40 * page, 0, 40, 40); - tex.mirrored(isRight).drawAt(m_pos, m_colorMul); + tex.mirrored(isRight).draw(Arg::bottomCenter = m_pos, m_colorMul); } void CaptainTakoVM::drawCharge() const { @@ -62,7 +62,6 @@ namespace abyss::Actor::Enemy::CaptainTako auto tex = m_texture({ 40 * page, 40 }, rawSize); const double scale = 1.0 + (m_chargeRate * Param::View::ChargingAddScale); const Vec2 size = s3d::Round(rawSize * scale); - const Vec2 pos = s3d::Round(m_pos - size / 2.0 - Vec2{0, (size.y -rawSize.y) / 2.0}); - tex.mirrored(isRight).resized(size).draw(pos, color); + tex.mirrored(isRight).resized(size).draw(Arg::bottomCenter = m_pos, color); } } diff --git a/Re-Abyss/build/resources/params/Actor/Enemy/CaptainTako/Param.toml b/Re-Abyss/build/resources/params/Actor/Enemy/CaptainTako/Param.toml index 9bc978ac6..f84fe514a 100644 --- a/Re-Abyss/build/resources/params/Actor/Enemy/CaptainTako/Param.toml +++ b/Re-Abyss/build/resources/params/Actor/Enemy/CaptainTako/Param.toml @@ -1,7 +1,6 @@ [Base] hp = 10 size = "(32, 38)" -pivot = "(0, 1)" [Wait] timeSec = 2.0