From bbf8d02254c15c3ef8fe00ae956430e0a8014788 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Thu, 2 May 2019 18:47:01 +0200 Subject: [PATCH] examples/moveplayer: add 4 players --- datas/inputs.lua | 28 +++++++++++++++++++++++++++ examples/gameplay/moveplayer/init.lua | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/datas/inputs.lua b/datas/inputs.lua index 488ee4d..499b576 100644 --- a/datas/inputs.lua +++ b/datas/inputs.lua @@ -27,4 +27,32 @@ return { ["select"] = "space" } }, + [3] = { + type = "keyboard", + keys = { + ["left"] = "f", + ["right"] = "h", + ["up"] = "t", + ["down"] = "g", + ["A"] = "v", + ["B"] = "b", + ["C"] = "n", + ["start"] = "-", + ["select"] = "/" + } + }, + [4] = { + type = "keyboard", + keys = { + ["left"] = "k", + ["right"] = "m", + ["up"] = "o", + ["down"] = "l", + ["A"] = ",", + ["B"] = ";", + ["C"] = ":", + ["start"] = "*", + ["select"] = "!" + } + }, } diff --git a/examples/gameplay/moveplayer/init.lua b/examples/gameplay/moveplayer/init.lua index 0c050b9..c5dd94b 100644 --- a/examples/gameplay/moveplayer/init.lua +++ b/examples/gameplay/moveplayer/init.lua @@ -31,7 +31,7 @@ function MovePlayer:new() self.world = World(self, "examples.gameplay.moveplayer.actors", "examples/gameplay/moveplayer/assets/arena.lua") - self.world:setPlayerNumber(2) + self.world:setPlayerNumber(4) self.world:loadMap() end