mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Pushed Changes
This commit is contained in:
parent
84ff2a453f
commit
be8d1addee
@ -1,9 +1,6 @@
|
|||||||
extends Node
|
extends Node
|
||||||
class_name Die
|
class_name Die
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
enum DieCategory{
|
enum DieCategory{
|
||||||
D4 = 4,
|
D4 = 4,
|
||||||
@ -18,7 +15,6 @@ enum DieCategory{
|
|||||||
var DieType = DieCategory
|
var DieType = DieCategory
|
||||||
var NumberOfFaces = 0
|
var NumberOfFaces = 0
|
||||||
|
|
||||||
|
|
||||||
func RollDie(InputDie):
|
func RollDie(InputDie):
|
||||||
#InputDie is supposed to be DieType for example.
|
#InputDie is supposed to be DieType for example.
|
||||||
var DieFaceResult = 0;
|
var DieFaceResult = 0;
|
||||||
@ -45,15 +41,8 @@ func RollDie(InputDie):
|
|||||||
print("Die Success Rate")
|
print("Die Success Rate")
|
||||||
print(DieSuccessPercentage)
|
print(DieSuccessPercentage)
|
||||||
|
|
||||||
|
|
||||||
func SetNumberOfSides():
|
func SetNumberOfSides():
|
||||||
var DSides = DieType
|
var DSides = DieType
|
||||||
# For 7 Die Set, testing purposes
|
|
||||||
|
|
||||||
|
|
||||||
########################################
|
|
||||||
# Need to Seed Random Number Generator #
|
|
||||||
########################################
|
|
||||||
|
|
||||||
match DSides:
|
match DSides:
|
||||||
4:
|
4:
|
||||||
@ -72,16 +61,8 @@ func SetNumberOfSides():
|
|||||||
NumberOfFaces = 20
|
NumberOfFaces = 20
|
||||||
|
|
||||||
print(NumberOfFaces)
|
print(NumberOfFaces)
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
DieType = DieCategory.D00
|
DieType = DieCategory.D00
|
||||||
SetNumberOfSides()
|
SetNumberOfSides()
|
||||||
RollDie(NumberOfFaces)
|
RollDie(NumberOfFaces)
|
||||||
# Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
@ -1,5 +1,42 @@
|
|||||||
extends MarginContainer
|
extends MarginContainer
|
||||||
|
|
||||||
|
onready var selection_Start = $HBoxContainer/VBoxContainer/MenuOptions/StartGame
|
||||||
|
onready var selection_DieTest = $HBoxContainer/VBoxContainer/MenuOptions/DieTest
|
||||||
|
onready var selection_LoadGame = $HBoxContainer/CenterContainer/MenuOptions/LoadGame
|
||||||
|
onready var selection_HostAndJoinGame = $HBoxContainer/VBoxContainer/MenuOptions/HostAndJoinGame
|
||||||
|
onready var selection_PlayerSettings =$HBoxContainer/VBoxContainer/MenuOptions/PlayerSettings
|
||||||
|
|
||||||
|
var currentSelectionIndex = 0;
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var TimeTest = OS.get_datetime()
|
var TimeTest = OS.get_datetime()
|
||||||
print(TimeTest)
|
print(TimeTest)
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if Input.is_action_just_pressed("ui_down"):
|
||||||
|
currentSelectionIndex +=1;
|
||||||
|
if(currentSelectionIndex == 5):
|
||||||
|
currentSelectionIndex = 0
|
||||||
|
SetMenuSelections(currentSelectionIndex)
|
||||||
|
|
||||||
|
func SetMenuSelections(CurrentSelection):
|
||||||
|
selection_Start.set_uppercase(false)
|
||||||
|
selection_DieTest.set_uppercase(false)
|
||||||
|
selection_LoadGame.set_uppercase(false)
|
||||||
|
selection_HostAndJoinGame.set_uppercase(false)
|
||||||
|
selection_PlayerSettings.set_uppercase(false)
|
||||||
|
|
||||||
|
var index = CurrentSelection
|
||||||
|
|
||||||
|
match index:
|
||||||
|
0:
|
||||||
|
selection_Start.set_uppercase(true)
|
||||||
|
1:
|
||||||
|
selection_DieTest.set_uppercase(true)
|
||||||
|
2:
|
||||||
|
selection_LoadGame.set_uppercase(true)
|
||||||
|
3:
|
||||||
|
selection_HostAndJoinGame.set_uppercase(true)
|
||||||
|
4:
|
||||||
|
selection_PlayerSettings.set_uppercase(true)
|
||||||
|
|
||||||
|
@ -20,6 +20,11 @@ __meta__ = {
|
|||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
color = Color( 0.858824, 0.333333, 0.129412, 1 )
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
margin_left = 120.0
|
margin_left = 120.0
|
||||||
margin_top = 80.0
|
margin_top = 80.0
|
||||||
@ -41,6 +46,7 @@ alignment = 1
|
|||||||
margin_top = 125.0
|
margin_top = 125.0
|
||||||
margin_right = 112.0
|
margin_right = 112.0
|
||||||
margin_bottom = 139.0
|
margin_bottom = 139.0
|
||||||
|
rect_scale = Vector2( 2, 2 )
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
text = "Start Game"
|
text = "Start Game"
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
@ -49,6 +55,7 @@ script = ExtResource( 3 )
|
|||||||
margin_top = 169.0
|
margin_top = 169.0
|
||||||
margin_right = 112.0
|
margin_right = 112.0
|
||||||
margin_bottom = 183.0
|
margin_bottom = 183.0
|
||||||
|
rect_scale = Vector2( 2, 2 )
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
text = "Die Test"
|
text = "Die Test"
|
||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
@ -57,6 +64,7 @@ script = ExtResource( 5 )
|
|||||||
margin_top = 213.0
|
margin_top = 213.0
|
||||||
margin_right = 112.0
|
margin_right = 112.0
|
||||||
margin_bottom = 227.0
|
margin_bottom = 227.0
|
||||||
|
rect_scale = Vector2( 2, 2 )
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
text = "Load Game"
|
text = "Load Game"
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
@ -65,6 +73,7 @@ script = ExtResource( 3 )
|
|||||||
margin_top = 257.0
|
margin_top = 257.0
|
||||||
margin_right = 112.0
|
margin_right = 112.0
|
||||||
margin_bottom = 271.0
|
margin_bottom = 271.0
|
||||||
|
rect_scale = Vector2( 2, 2 )
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
text = "Host / Join Game"
|
text = "Host / Join Game"
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
@ -73,6 +82,7 @@ script = ExtResource( 2 )
|
|||||||
margin_top = 301.0
|
margin_top = 301.0
|
||||||
margin_right = 112.0
|
margin_right = 112.0
|
||||||
margin_bottom = 315.0
|
margin_bottom = 315.0
|
||||||
|
rect_scale = Vector2( 2, 2 )
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
text = "Player Settings"
|
text = "Player Settings"
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
@ -89,6 +99,7 @@ margin_left = 300.0
|
|||||||
margin_top = 213.0
|
margin_top = 213.0
|
||||||
margin_right = 367.0
|
margin_right = 367.0
|
||||||
margin_bottom = 227.0
|
margin_bottom = 227.0
|
||||||
|
rect_scale = Vector2( 4, 4 )
|
||||||
text = "Test Menu"
|
text = "Test Menu"
|
||||||
|
|
||||||
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/StartGame" to="HBoxContainer/VBoxContainer/MenuOptions/StartGame" method="_on_Start_Game_gui_input"]
|
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/StartGame" to="HBoxContainer/VBoxContainer/MenuOptions/StartGame" method="_on_Start_Game_gui_input"]
|
||||||
|
Loading…
Reference in New Issue
Block a user