summaryrefslogtreecommitdiffhomepage
path: root/ExampleGenerator.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-18 20:38:16 +0200
committerAki <please@ignore.pl>2022-04-18 20:39:44 +0200
commitadd251b4ea37b57cf926b07e5e04d9b065f82a2c (patch)
tree9cecb47f168c985017971a3373de59b35f85db1a /ExampleGenerator.cpp
parentbbec07ab3de333649d14a64fa01f7e8ad6d56c58 (diff)
downloadbullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.zip
bullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.tar.gz
bullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.tar.bz2
Playing around with enemies, added dumb pos manipulation
Diffstat (limited to 'ExampleGenerator.cpp')
-rw-r--r--ExampleGenerator.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/ExampleGenerator.cpp b/ExampleGenerator.cpp
index 4c86d94..76c4cb7 100644
--- a/ExampleGenerator.cpp
+++ b/ExampleGenerator.cpp
@@ -11,12 +11,12 @@
ExampleGenerator::ExampleGenerator(ConstantVelocityBullet::Vector& bullets) :
m_bullets {bullets},
m_delay {0},
- m_interval {0.04f},
- m_cone {0.3f},
+ m_interval {0.05f},
+ m_cone {0.4f},
m_angle {0.3f},
- m_speed {100},
+ m_speed {70},
m_shift {10},
- m_segments {2},
+ m_segments {3},
m_color {240, 0, 0, 255}
{
}
@@ -42,13 +42,13 @@ ExampleGenerator::update(const float dt)
bullet.position.y = pos.y + sin * m_shift;
m_bullets.push_back(std::move(bullet));
}
- m_angle += dt * 1.1f;
- if (m_angle >= 0.7f) {
- m_angle -= 0.4f;
- if (m_color.g == 0)
- m_color.g = 150;
- else
- m_color.g = 0;
- }
+ }
+ m_angle += dt * 0.5f;
+ if (m_angle >= 0.7f) {
+ m_angle -= 0.4f;
+ if (m_color.g == 0)
+ m_color.g = 120;
+ else
+ m_color.g = 0;
}
}