Corentin Cailleaud commited on
Commit
ff0d35a
1 Parent(s): 22a9b1b
Files changed (1) hide show
  1. cubzh.lua +20 -4
cubzh.lua CHANGED
@@ -38,10 +38,18 @@ local onboardingConfig = {
38
  local data = {}
39
  data.ui = ui:createText("Hold click and drag to move camera", Color.White)
40
  data.ui.pos = { Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.5 - data.ui.Height * 0.5 }
 
 
 
 
 
 
 
41
  return data
42
  end,
43
- stop = function(onboarding, data)
44
- data:remove()
 
45
  end,
46
  },
47
  {
@@ -50,10 +58,18 @@ local onboardingConfig = {
50
  local data = {}
51
  data.ui = ui:createText("Use WASD/ZQSD to move", Color.White)
52
  data.ui.pos = { Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.5 - data.ui.Height * 0.5 }
 
 
 
 
 
 
 
53
  return data
54
  end,
55
- stop = function(onboarding, data)
56
- data:remove()
 
57
  end,
58
  },
59
  },
 
38
  local data = {}
39
  data.ui = ui:createText("Hold click and drag to move camera", Color.White)
40
  data.ui.pos = { Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.5 - data.ui.Height * 0.5 }
41
+
42
+ data.listener = LocalEvent:Listen(LocalEvent.Name.PointerDrag, function()
43
+ Timer(1, function()
44
+ onboarding:next()
45
+ end)
46
+ end)
47
+
48
  return data
49
  end,
50
+ stop = function(_, data)
51
+ data.ui:remove()
52
+ data.listener:Remove()
53
  end,
54
  },
55
  {
 
58
  local data = {}
59
  data.ui = ui:createText("Use WASD/ZQSD to move", Color.White)
60
  data.ui.pos = { Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.5 - data.ui.Height * 0.5 }
61
+
62
+ data.listener = LocalEvent:Listen(LocalEvent.Name.KeyboardInput, function()
63
+ Timer(1, function()
64
+ onboarding:next()
65
+ end)
66
+ end)
67
+
68
  return data
69
  end,
70
+ stop = function(_, data)
71
+ data.ui:remove()
72
+ data.listener:Remove()
73
  end,
74
  },
75
  },