Skip to content

Commit

Permalink
update RollingTako
Browse files Browse the repository at this point in the history
  • Loading branch information
tyanmahou committed Dec 12, 2024
1 parent 03f7110 commit 0e4b65d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Re-Abyss/app/components/Actor/Enemy/RollingTako/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ namespace abyss::Actor::Enemy::RollingTako
{
// 共通ビルド
CommonBuilder::Build(pActor, BuildOption{}
.setInitPos(entity.pos)
.setInitPos(entity.footPos)
.setForward(entity.forward)
.setBodySize(Param::Base::Size)
.setBodyOffset(Param::Base::Pivot)
.setBodyAnchor(BodyAnchor::BottomCenter)
.setInitHp(Param::Base::Hp)
.setIsEnableRoomHit(true)
.setVModelPresenter<Presenter>(pActor)
Expand Down
6 changes: 2 additions & 4 deletions Re-Abyss/app/params/Actor/Enemy/RollingTako/Param.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <Siv3D/Vector2D.hpp>
#include <abyss/utils/TOML/TOMLBind.hpp>

Expand All @@ -8,12 +8,10 @@ namespace abyss::Actor::Enemy::RollingTako
{
[[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{ 6 };
inline static s3d::Vec2 Size{ 45, 45 };
inline static s3d::Vec2 Pivot{ 0, 7.5 };
};

[[TOML_BIND(Wait::SearchRange, "Wait.searchRange")]]
Expand All @@ -38,4 +36,4 @@ namespace abyss::Actor::Enemy::RollingTako
inline static double RunAnimeTimeSec{ 0.2 };
};
};
}
}
6 changes: 3 additions & 3 deletions Re-Abyss/app/views/Actor/Enemy/RollingTako/RollingTakoVM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/views/Actor/Enemy/RollingTako/RollingTakoVM.hpp>
#include <abyss/views/Actor/Enemy/RollingTako/RollingTakoVM.hpp>
#include <Siv3D.hpp>
#include <abyss/params/Actor/Enemy/RollingTako/Param.hpp>
#include <abyss/commons/Resource/Assets/Assets.hpp>
Expand Down Expand Up @@ -46,13 +46,13 @@ namespace abyss::Actor::Enemy::RollingTako
bool isRight = m_forward.isRight();
int32 time = static_cast<int32>(Periodic::Square0_1(Param::View::WaitAnimeTimeSec, m_time));
auto tex = m_texture(60 * time, 0, 60, 60);
tex.mirrored(isRight).drawAt(m_pos, m_colorMul);
tex.mirrored(isRight).draw(Arg::bottomCenter = m_pos, m_colorMul);
}
void RollingTakoVM::drawRun() const
{
bool isRight = m_forward.isRight();
int32 time = static_cast<int32>(Periodic::Square0_1(Param::View::RunAnimeTimeSec, m_time));
auto tex = m_texture(60 * time, 60, 60, 60);
tex.mirrored(isRight).drawAt(m_pos, m_colorMul);
tex.mirrored(isRight).draw(Arg::bottomCenter = m_pos, m_colorMul);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[Base]
hp = 6
size = "(45, 45)"
pivot = "(0, 7.5)"

[Wait]
searchRange = 500.0
Expand Down

0 comments on commit 0e4b65d

Please sign in to comment.