mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-17 14:28:30 +01:00
Air tool
This commit is contained in:
parent
bbf7851596
commit
8efd07a849
18
src/simulation/tools/Air.cpp
Normal file
18
src/simulation/tools/Air.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "simulation/Tools.h"
|
||||
#include "simulation/Air.h"
|
||||
//#TPT-Directive ToolClass Tool_Air TOOL_AIR 3
|
||||
Tool_Air::Tool_Air()
|
||||
{
|
||||
Identifier = "DEFAULT_TOOL_AIR";
|
||||
Name = "AIR";
|
||||
Colour = PIXPACK(0xFFFFFF);
|
||||
Description = "Creates air pressure";
|
||||
}
|
||||
|
||||
int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||
{
|
||||
sim->air->pv[y/CELL][x/CELL] += 0.03f*strength;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Tool_Air::~Tool_Air() {}
|
Loading…
x
Reference in New Issue
Block a user