mirror of
https://repo.or.cz/minetest_returnmirror.git
synced 2024-11-14 20:30:18 +01:00
Add simple particles
This commit is contained in:
parent
f6b9b5d1bf
commit
32f59bd4ff
26
init.lua
26
init.lua
|
@ -14,8 +14,34 @@ minetest.register_tool("returnmirror:returnmirror", {
|
|||
if mana.subtract(user:get_player_name(), returnmirror.cost) then
|
||||
local src = user:getpos()
|
||||
minetest.sound_play( {name="returnmirror_teleport", gain=1}, {pos=src, max_hear_distance=30})
|
||||
minetest.add_particlespawner({
|
||||
amount = 50,
|
||||
time = 0.1,
|
||||
minpos = {x=src.x-0.4, y=src.y+0.25, z=src.z-0.4},
|
||||
maxpos = {x=src.x+0.4, y=src.y+0.75, z=src.z+0.4},
|
||||
minvel = {x=-0.2, y=-0.2, z=-0.2},
|
||||
maxvel = {x=0.2, y=0.2, z=0.2},
|
||||
minexptime=3,
|
||||
maxexptime=4.5,
|
||||
minsize=1,
|
||||
maxsize=1.25,
|
||||
texture = "returnmirror_particle_departure.png",
|
||||
})
|
||||
user:setpos(dest)
|
||||
minetest.sound_play( {name="returnmirror_teleport", gain=1}, {pos=dest, max_hear_distance=30})
|
||||
minetest.add_particlespawner({
|
||||
amount = 100,
|
||||
time = 0.1,
|
||||
minpos = {x=dest.x-0.4, y=dest.y+0.25, z=dest.z-0.4},
|
||||
maxpos = {x=dest.x+0.4, y=dest.y+0.75, z=dest.z+0.4},
|
||||
minvel = {x=-0.4, y=-0.3, z=-0.4},
|
||||
maxvel = {x=0.4, y=0.3, z=0.4},
|
||||
minexptime=6,
|
||||
maxexptime=12,
|
||||
minsize=1,
|
||||
maxsize=1.25,
|
||||
texture = "returnmirror_particle_arrival.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
|
BIN
textures/returnmirror_particle_arrival.png
Normal file
BIN
textures/returnmirror_particle_arrival.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 B |
BIN
textures/returnmirror_particle_departure.png
Normal file
BIN
textures/returnmirror_particle_departure.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 B |
Loading…
Reference in New Issue
Block a user