Skip to content

Commit

Permalink
Treasures now emit sparkle particles.
Browse files Browse the repository at this point in the history
  • Loading branch information
Espyo committed Oct 2, 2024
1 parent 9017ff4 commit 2dafbfc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Source/documents/Todo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Point I left on (so I can continue the next day without losing my train of thought)
Point I left on (so I can continue the next day without losing my train of thought)
not all public domain sounds are public domain, but instead cc0

Current tasks (tasks being worked on, but not yet committed)
Expand Down Expand Up @@ -156,7 +156,6 @@ Next tasks (roughly sorted most important first)
Add Helodity's Plasm Wraith
Mobs for decorative pebbles, stones, and sticks
More particles
Treasures should have sparkle particles
Onions should spit spark particles when generating Pikmin inside
Dust particles while walking
Dust poof when a leader lands from a height
Expand Down
17 changes: 17 additions & 0 deletions Source/source/mobs/treasure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,21 @@ treasure::treasure(const point &pos, treasure_type* type, const float angle) :
MOB_TYPE::ANIM_IDLING, START_ANIM_OPTION_RANDOM_TIME_ON_SPAWN, true
);

particle pa(
PARTICLE_TYPE_BITMAP, pos, z + height + 1.0f,
28.0f, 1.0f, PARTICLE_PRIORITY_LOW
);
pa.bitmap = game.sys_assets.bmp_sparkle;
pa.speed.y = -30.0f;
particle_generator pg(0.4f, pa);
pg.id = MOB_PARTICLE_GENERATOR_ID_SCRIPT;
pg.follow_mob = this;
pg.follow_angle = &this->angle;
pg.follow_z_offset = z + height + 1.0f;
pg.duration_deviation = 0.1f;
pg.interval_deviation = 0.05f;
pg.pos_deviation = point(radius * 0.75f, radius * 0.75f);
pg.size_deviation = 0.5f;
particle_generators.push_back(pg);

}

0 comments on commit 2dafbfc

Please sign in to comment.