summaryrefslogtreecommitdiff
path: root/mario/init.lua
diff options
context:
space:
mode:
authorDonBatman <serfdon@gmail.com>2015-10-27 12:35:55 -0700
committerDonBatman <serfdon@gmail.com>2015-10-27 12:35:55 -0700
commit32148072652c69844bbaa3e19d6071d48980a7d8 (patch)
tree4bbeef90c0489b7e552d4f00e36aed4dbd1739a2 /mario/init.lua
parent3ddfbbc093a641cf5e4388fa07b2564465b739ef (diff)
Stared work on gamestate and hud for mario
Diffstat (limited to 'mario/init.lua')
-rw-r--r--mario/init.lua21
1 files changed, 13 insertions, 8 deletions
diff --git a/mario/init.lua b/mario/init.lua
index c435bf7..426e354 100644
--- a/mario/init.lua
+++ b/mario/init.lua
@@ -5,6 +5,7 @@ dofile(minetest.get_modpath("mario").."/blocks.lua")
dofile(minetest.get_modpath("mario").."/portal.lua")
dofile(minetest.get_modpath("mario").."/turtle.lua")
dofile(minetest.get_modpath("mario").."/gamestate.lua")
+dofile(minetest.get_modpath("mario").."/hud.lua")
minetest.register_node("mario:placer",{
@@ -21,17 +22,21 @@ minetest.register_node("mario:placer",{
paramtype = "light",
groups = {cracky = 3},
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
- local schem = minetest.get_modpath("mario").."/schems/mario.mts"
- minetest.place_schematic({x=pos.x-1,y=pos.y-2,z=pos.z-2},schem,0, "air", true)
- player:setpos({x=pos.x+16,y=pos.y+0.1,z=pos.z+1})
- print(name)
+ --local schem = minetest.get_modpath("mario").."/schems/mario.mts"
+ --minetest.place_schematic({x=pos.x-1,y=pos.y-2,z=pos.z-2},schem,0, "air", true)
+ --player:setpos({x=pos.x+16,y=pos.y+0.1,z=pos.z+1})
+ --print(name)
player:set_physics_override(1,1,0.3,true,false)
-
+
+ mario.game_start(pos, player, {
+ schematic = minetest.get_modpath("mario").."/schems/mario.mts",
+ scorename = "mario:classic_board",
+ })
-- Left Turtle
- minetest.add_entity({x=pos.x+3,y=pos.y+12,z=pos.z+1}, "mario:turtle1")
+ --minetest.add_entity({x=pos.x+3,y=pos.y+12,z=pos.z+1}, "mario:turtle1")
-- Right Turtle
- local turtler = minetest.add_entity({x=pos.x+30,y=pos.y+12,z=pos.z+1}, "mario:turtle1"):get_luaentity()
- turtler.direction = {x=-1,y=0,z=0}
+ --local turtler = minetest.add_entity({x=pos.x+30,y=pos.y+12,z=pos.z+1}, "mario:turtle1"):get_luaentity()
+ --turtler.direction = {x=-1,y=0,z=0}
minetest.sound_play("mario-game-start", {pos = pos,max_hear_distance = 40,gain = 10.0,})
end,