Skip to content

Commit

Permalink
update Schield
Browse files Browse the repository at this point in the history
  • Loading branch information
tyanmahou committed Dec 15, 2024
1 parent 679d1cc commit 324b2e5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
5 changes: 3 additions & 2 deletions Re-Abyss/app/components/Actor/Enemy/Schield/Builder.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/components/Actor/Enemy/Schield/Builder.hpp>
#include <abyss/components/Actor/Enemy/Schield/Builder.hpp>

#include <abyss/entities/Actor/Enemy/SchieldEntity.hpp>
#include <abyss/params/Actor/Enemy/Schield/Param.hpp>
Expand All @@ -25,7 +25,8 @@ namespace abyss::Actor::Enemy::Schield
{
// 共通ビルド
CommonBuilder::Build(pActor, BuildOption{}
.setInitPos(entity.pos)
.setInitPos(entity.footPos)
.setBodyAnchor(BodyAnchor::BottomCenter)
.setForward(entity.forward)
.setBodySize(Param::Base::Size)
.setInitHp(Param::Base::Hp)
Expand Down
4 changes: 2 additions & 2 deletions Re-Abyss/app/components/Actor/Enemy/Schield/FaceCtrl.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/components/Actor/Enemy/Schield/FaceCtrl.hpp>
#include <abyss/components/Actor/Enemy/Schield/FaceCtrl.hpp>

#include <Siv3D.hpp>

Expand All @@ -17,7 +17,7 @@ namespace abyss::Actor::Enemy::Schield
}
s3d::Circle FaceCtrl::getCollider() const
{
s3d::Vec2 offset{ 53.0 * m_body->getForward().signH(), 16};
s3d::Vec2 offset{ 53.0 * m_body->getForward().signH(), 16 -30};
return s3d::Circle(m_body->getPos() + offset, Param::Wait::FaceColRadius);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/components/Actor/Enemy/Schield/State/AttackCrossState.hpp>
#include <abyss/components/Actor/Enemy/Schield/State/AttackCrossState.hpp>
#include <abyss/components/Actor/Enemy/Schield/State/WaitState.hpp>

#include <abyss/params/Actor/Enemy/Schield/Param.hpp>
Expand Down Expand Up @@ -30,8 +30,8 @@ namespace abyss::Actor::Enemy::Schield
if (!m_isAttack && m_timer.rate() >= 0.5) {
m_isAttack = true;
const auto& pos = m_body->getPos();
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ -34, -25 }, s3d::Vec2{ -1, -1 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 34, -25 }, s3d::Vec2{ 1, -1 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ -34, -25 - 30 }, s3d::Vec2{ -1, -1 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 34, -25 - 30 }, s3d::Vec2{ 1, -1 });
}

if (m_transitionToWait.isRunning()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/components/Actor/Enemy/Schield/State/AttackPlusState.hpp>
#include <abyss/components/Actor/Enemy/Schield/State/AttackPlusState.hpp>
#include <abyss/components/Actor/Enemy/Schield/State/AttackCrossState.hpp>

#include <abyss/params/Actor/Enemy/Schield/Param.hpp>
Expand Down Expand Up @@ -34,9 +34,9 @@ namespace abyss::Actor::Enemy::Schield
if (!m_isAttack && m_timer.rate() >= 0.5) {
m_isAttack = true;
const auto& pos = m_body->getPos();
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ -55, 10 }, s3d::Vec2{-1, 0});
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 55, 10 }, s3d::Vec2{ 1, 0 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 0, -27 }, s3d::Vec2{ 0, -1 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ -55, 10 - 30 }, s3d::Vec2{-1, 0});
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 55, 10 - 30 }, s3d::Vec2{ 1, 0 });
m_pActor->getModule<Actors>()->create<Shot::Builder>(pos + s3d::Vec2{ 0, -27 - 30 }, s3d::Vec2{ 0, -1 });
}

if (m_transitionToAttackCross.isRunning()) {
Expand Down
16 changes: 8 additions & 8 deletions Re-Abyss/app/views/Actor/Enemy/Schield/SchieldVM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <abyss/views/Actor/Enemy/Schield/SchieldVM.hpp>
#include <abyss/views/Actor/Enemy/Schield/SchieldVM.hpp>

#include <Siv3D.hpp>
#include <abyss/commons/Resource/Assets/Assets.hpp>
Expand Down Expand Up @@ -57,11 +57,11 @@ namespace abyss::Actor::Enemy::Schield
int32 page = static_cast<int32>(Periodic::Triangle0_1(Param::View::AnimeTimeSec, m_time) * 3.0);
{
auto&& tex = m_texture(U"wait");
tex(0, 60 * page, 150, 60).mirrored(isRight).drawAt(m_pos, m_colorMul);
tex(0, 60 * page, 150, 60).mirrored(isRight).draw(Arg::bottomCenter = m_pos, m_colorMul);
}
{
auto&& tex = m_textureOver(U"wait_over");
tex(0, 60 * page, 150, 60).mirrored(isRight).drawAt(m_pos);
tex(0, 60 * page, 150, 60).mirrored(isRight).draw(Arg::bottomCenter = m_pos);
}
}

Expand All @@ -73,13 +73,13 @@ namespace abyss::Actor::Enemy::Schield
auto&& tex = m_texture(U"wait_to_attack3");
tex(150 * (page / 4), 60 * (page % 4), 150, 60)
.mirrored(isRight)
.drawAt(m_pos, m_colorMul);
.draw(Arg::bottomCenter = m_pos, m_colorMul);
}
{
auto&& tex = m_textureOver(U"wait_to_attack3_over");
tex(150 * (page / 4), 60 * (page % 4), 150, 60)
.mirrored(isRight)
.drawAt(m_pos);
.draw(Arg::bottomCenter = m_pos);
}
}

Expand All @@ -96,13 +96,13 @@ namespace abyss::Actor::Enemy::Schield
auto&& tex = m_texture(U"wait_to_attack");
tex(150 * (page / 4), 60 * (page % 4), 150, 60)
.mirrored(isRight)
.drawAt(m_pos, m_colorMul);
.draw(Arg::bottomCenter = m_pos, m_colorMul);
}
{
auto&& tex = m_textureOver(U"wait_to_attack_over");
tex(150 * (page / 4), 60 * (page % 4), 150, 60)
.mirrored(isRight)
.drawAt(m_pos);
.draw(Arg::bottomCenter = m_pos);
}
}

Expand All @@ -117,6 +117,6 @@ namespace abyss::Actor::Enemy::Schield
bool isRight = m_forward.isRight();
tex(120 * (page / 4), 60 * (page % 4), 120, 60)
.mirrored(isRight)
.drawAt(m_pos, m_colorMul);
.draw(Arg::bottomCenter = m_pos, m_colorMul);
}
}

0 comments on commit 324b2e5

Please sign in to comment.