mirror of
https://github.com/codeninjasgg/roblox-royale-camp.git
synced 2024-11-24 08:17:52 -05:00
Deploying to gh-pages from @ 3074536999
🚀
This commit is contained in:
parent
31240fd084
commit
4eb5c7c8cc
7 changed files with 109 additions and 98 deletions
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -214,7 +214,8 @@ GameSettings.matchDuration = 10
|
|||
GameSettings.minimumPlayers = 2
|
||||
GameSettings.transitionTime = 5
|
||||
|
||||
return GameSettings</code></pre>
|
||||
return GameSettings
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--matchmanager"><code>ServerStorage > ModuleScripts > MatchManager</code></h3>
|
||||
<pre><code class="language-lua">local MatchManager = {}
|
||||
|
||||
|
@ -222,7 +223,8 @@ function MatchManager.preparePlayers()
|
|||
print("Game starting!")
|
||||
end
|
||||
|
||||
return MatchManager</code></pre>
|
||||
return MatchManager
|
||||
</code></pre>
|
||||
<h3 id="serverscriptservice--gamemanager"><code>ServerScriptService > GameManager</code></h3>
|
||||
<pre><code class="language-lua">-- Services
|
||||
local ServerStorage = game:GetService("ServerStorage")
|
||||
|
@ -241,7 +243,8 @@ while true do
|
|||
print("Intermission over")
|
||||
wait(gameSettings.transitionTime)
|
||||
matchManager.prepareGame()
|
||||
end</code></pre>
|
||||
end
|
||||
</code></pre>
|
||||
<hr>
|
||||
<p>A complete example project of the scripting we have done in class today can be found <a href="https://education.roblox.com/assets/blt7fffb3d25cb1a1dd/battleroyale_lesson2_final.rbxl?disposition=inline">here</a>.</p>
|
||||
<h2 id="optional-homework-📄">Optional Homework 📄</h2>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -230,7 +230,8 @@ while true do
|
|||
-- Placeholder wait for the length of the game.
|
||||
matchEnd.Event:Wait()
|
||||
|
||||
end</code></pre>
|
||||
end
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--matchmanager"><code>ServerStorage > ModuleScripts > MatchManager</code></h3>
|
||||
<pre><code class="language-lua">local MatchManager = {}
|
||||
|
||||
|
@ -270,7 +271,8 @@ end
|
|||
|
||||
matchStart.Event:Connect(startTimer)
|
||||
|
||||
return MatchManager</code></pre>
|
||||
return MatchManager
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--timer"><code>ServerStorage > ModuleScripts > Timer</code></h3>
|
||||
<pre><code class="language-lua">local Timer = {}
|
||||
Timer.__index = Timer
|
||||
|
@ -330,7 +332,8 @@ function Timer:stop()
|
|||
self._running = false
|
||||
end
|
||||
|
||||
return Timer</code></pre>
|
||||
return Timer
|
||||
</code></pre>
|
||||
<hr>
|
||||
<p>A complete example project of the scripting we have done in class today can be found <a href="https://education.roblox.com/assets/blt03dc7fe967c0c5f3/battleroyale_lesson4_final.rbxl?disposition=inline">here</a>.</p>
|
||||
<h2 id="optional-homework-📄">Optional Homework 📄</h2>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -231,7 +231,8 @@ while true do
|
|||
matchManager.prepareGame()
|
||||
local endState = matchEnd.Event:Wait()
|
||||
print("Game ended with: " .. endState)
|
||||
end</code></pre>
|
||||
end
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--matchmanager"><code>ServerStorage > ModuleScripts > MatchManager</code></h3>
|
||||
<pre><code class="language-lua">local MatchManager = {}
|
||||
|
||||
|
@ -289,7 +290,8 @@ end
|
|||
matchStart.Event:Connect(startTimer)
|
||||
matchEnd.Event:Connect(stopTimer)
|
||||
|
||||
return MatchManager</code></pre>
|
||||
return MatchManager
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--gamesettings"><code>ServerStorage > ModuleScripts > GameSettings</code></h3>
|
||||
<pre><code class="language-lua">local GameSettings = {}
|
||||
|
||||
|
@ -305,7 +307,8 @@ GameSettings.endStates = {
|
|||
FoundWinner = "FoundWinner"
|
||||
}
|
||||
|
||||
return GameSettings</code></pre>
|
||||
return GameSettings
|
||||
</code></pre>
|
||||
<h3 id="serverstorage--modulescripts--playermanager"><code>ServerStorage > ModuleScripts > PlayerManager</code></h3>
|
||||
<pre><code class="language-lua">local PlayerManager = {}
|
||||
|
||||
|
@ -396,7 +399,8 @@ end
|
|||
-- Events
|
||||
Players.PlayerAdded:Connect(onPlayerJoin)
|
||||
|
||||
return PlayerManager</code></pre>
|
||||
return PlayerManager
|
||||
</code></pre>
|
||||
<hr>
|
||||
<p>A complete example project of the scripting we have done in class today can be found <a href="https://education.roblox.com/assets/blt03dc7fe967c0c5f3/battleroyale_lesson4_final.rbxl?disposition=inline">here</a>.</p>
|
||||
<h2 id="optional-homework-📄">Optional Homework 📄</h2>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -184,7 +184,8 @@
|
|||
<p>Download <a href="https://education.roblox.com/assets/bltb5d7401ffa20b600/battleroyale_lesson6_final.rbxl?disposition=inline">this</a> file and open it in Roblox Studio. Publish it to Roblox (<code>Alt+P</code>) as your final Roblox Royale game, so name it something cool! Change the way that the arena looks by changing the colors, materials, and shapes of existing parts and by adding new parts from the toolbox.</p>
|
||||
<h3 id="second-half">Second Half</h3>
|
||||
<p>Let's open the <code>GameSettings</code> script (<code>ServerStorage > ModuleScripts > GameSettings</code>) and update a configuration variable:</p>
|
||||
<pre><code class="language-lua">GameSettings.matchDuration = 180</code></pre>
|
||||
<pre><code class="language-lua">GameSettings.matchDuration = 180
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>💡 Note: We are changing the match duration variable from 10 seconds to 180 seconds. 180 seconds was calculated by taking the amount of seconds in one minute (60) and multiplying it by 3 to get the amount of seconds there are in 3 minutes.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</a>
|
||||
<header class="px-4 pt-3 sm:px-6 sm:pt-4">
|
||||
<div class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
Last published 12/12/2020,<br> 8:02:40 PM PST.
|
||||
Last published 2/8/2021,<br> 2:16:02 PM PST.
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue