MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / SpawnDrip

Function SpawnDrip

TombEngine/Game/effects/drip.cpp:30–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 std::vector<Drip> Drips = {};
29
30 void SpawnDrip(const Vector3& pos, int roomNumber, const Vector3& velocity, float lifeInSec, float gravity)
31 {
32 constexpr auto WIDTH = 4.0f;
33
34 auto& drip = GetNewEffect(Drips, DRIP_COUNT_MAX);
35
36 drip.Position = pos;
37 drip.RoomNumber = roomNumber;
38 drip.Velocity = velocity;
39 drip.Size = Vector2(WIDTH, 0.0f);
40 drip.Color = DRIP_COLOR_WHITE;
41 drip.Life =
42 drip.LifeMax = std::round(lifeInSec * FPS);
43 drip.Gravity = gravity;
44 }
45
46 void SpawnSplashDrips(const Vector3& pos, int roomNumber, unsigned int count, bool isSmallSplash)
47 {

Callers 3

ScalesCollisionFunction · 0.85
SpawnSplashDripsFunction · 0.85
SpawnWetnessDripFunction · 0.85

Calls 1

Vector2Function · 0.50

Tested by

no test coverage detected