Compare commits
No commits in common. "ef5e8268c579938c0f793481cff3bb220b018d6d" and "a1cd380a18d251e1c926ff1991af89c4889cdbe9" have entirely different histories.
ef5e8268c5
...
a1cd380a18
25 changed files with 166 additions and 213 deletions
13
Main.tscn
Normal file
13
Main.tscn
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://UI.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://mini-game/MiniGame.tscn" type="PackedScene" id=4]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="MiniGame" parent="." instance=ExtResource( 4 )]
|
||||
|
||||
[node name="UI" parent="." instance=ExtResource( 3 )]
|
||||
[connection signal="game_over" from="MiniGame" to="." method="_on_MiniGame_game_over"]
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://images/pause.png" type="Texture" id=1]
|
||||
[ext_resource path="res://scenes/PauseMenu.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scenes/UI.gd" type="Script" id=3]
|
||||
|
||||
[node name="UI" type="Control"]
|
||||
anchor_right = 1.0
|
||||
|
|
@ -10,7 +8,6 @@ anchor_bottom = 1.0
|
|||
margin_top = -0.471939
|
||||
margin_bottom = -0.471924
|
||||
mouse_filter = 2
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
|
@ -30,7 +27,7 @@ __meta__ = {
|
|||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = 1910.0
|
||||
margin_bottom = 74.0
|
||||
margin_bottom = 42.0
|
||||
hint_tooltip = "Mettre en pause"
|
||||
size_flags_horizontal = 3
|
||||
__meta__ = {
|
||||
|
|
@ -38,7 +35,7 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer"]
|
||||
margin_right = 1832.0
|
||||
margin_right = 1864.0
|
||||
margin_bottom = 14.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
|
|
@ -48,20 +45,7 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="TextureButton" type="TextureButton" parent="MarginContainer/HBoxContainer"]
|
||||
margin_left = 1836.0
|
||||
margin_left = 1868.0
|
||||
margin_right = 1900.0
|
||||
margin_bottom = 64.0
|
||||
margin_bottom = 32.0
|
||||
texture_normal = ExtResource( 1 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="MarginContainer/HBoxContainer/TextureButton"]
|
||||
show_behind_parent = true
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
color = Color( 0, 0, 0, 0.231373 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PauseMenu" parent="." instance=ExtResource( 2 )]
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/TextureButton" to="." method="_on_TextureButton_pressed"]
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/open-sans/OpenSans-Regular.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
size = 30
|
||||
font_data = ExtResource( 1 )
|
||||
BIN
images/pause.png
BIN
images/pause.png
Binary file not shown.
|
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 314 B |
|
|
@ -15,8 +15,8 @@
|
|||
inkscape:version="1.0.2 (1.0.2+r75+1)"
|
||||
sodipodi:docname="pause.svg"
|
||||
inkscape:export-filename="/home/vergnet/Godot/pir-serious-game-ethics/images/pause.png"
|
||||
inkscape:export-xdpi="8.1280003"
|
||||
inkscape:export-ydpi="8.1280003">
|
||||
inkscape:export-xdpi="4.0640001"
|
||||
inkscape:export-ydpi="4.0640001">
|
||||
<defs
|
||||
id="defs2">
|
||||
<inkscape:path-effect
|
||||
|
|
@ -94,8 +94,8 @@
|
|||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="993"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1043"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
x="30.616072"
|
||||
y="7.5595241"
|
||||
inkscape:path-effect="#path-effect12"
|
||||
d="M 30.616072,7.5595241 H 81.642859 V 180.67262 H 30.616072 Z m -51.24897,0 H -71.659685 V 180.67262 h 51.026787 z"
|
||||
d="M 30.616072,7.5595241 H 81.642859 V 180.67262 H 30.616072 Z m -28.8955677,0 H -49.306282 V 180.67262 H 1.7205043 Z"
|
||||
sodipodi:type="rect"
|
||||
transform="matrix(0.97264845,0,0,1,95.144941,5.8839269)" />
|
||||
</g>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
|
@ -2,18 +2,8 @@ extends Node2D
|
|||
|
||||
onready var texture : TextureRect = $TextureRect
|
||||
|
||||
var moving = false
|
||||
|
||||
func stop():
|
||||
moving = false
|
||||
texture.material.set_shader_param("scroll_speed", 0)
|
||||
|
||||
func start():
|
||||
moving = true
|
||||
texture.material.set_shader_param("scroll_speed", 0.2)
|
||||
|
||||
func _process(delta):
|
||||
if get_tree().paused and moving:
|
||||
stop()
|
||||
elif not get_tree().paused and not moving:
|
||||
start()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ shader_param/scroll_speed = 0.0
|
|||
extents = Vector2( 958.398, 78.6175 )
|
||||
|
||||
[node name="foreground" type="Node2D"]
|
||||
pause_mode = 2
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ _global_script_class_icons={
|
|||
[application]
|
||||
|
||||
config/name="Pir-serious-game-ethics"
|
||||
run/main_scene="res://scenes/Main.tscn"
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/UI.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://mini-game/MiniGame.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="MiniGame" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="UI" parent="." instance=ExtResource( 2 )]
|
||||
[connection signal="game_over" from="MiniGame" to="." method="_on_MiniGame_game_over"]
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
extends Control
|
||||
|
||||
func pause():
|
||||
get_tree().paused = true
|
||||
show()
|
||||
|
||||
|
||||
func unpause():
|
||||
get_tree().paused = false
|
||||
hide()
|
||||
|
||||
|
||||
func _ready():
|
||||
connect("gui_input", self, '_on_gui_input')
|
||||
|
||||
func _input(event: InputEvent):
|
||||
if event.is_action_pressed("ui_cancel") and visible:
|
||||
unpause()
|
||||
get_tree().set_input_as_handled()
|
||||
|
||||
|
||||
func _on_BackgroundButton_pressed():
|
||||
unpause()
|
||||
|
||||
|
||||
func _on_ContinueButton_pressed():
|
||||
unpause()
|
||||
|
||||
|
||||
func _on_ExitButton_pressed():
|
||||
get_tree().quit(0)
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/PauseMenu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://images/pause.png" type="Texture" id=2]
|
||||
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://fonts/open-sans/OpenSans-Light.ttf" type="DynamicFontData" id=4]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 50
|
||||
font_data = ExtResource( 4 )
|
||||
|
||||
[node name="PauseMenu" type="Control"]
|
||||
pause_mode = 2
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 0, 0, 0, 0.196078 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="BackgroundButton" type="TextureButton" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_right = 400
|
||||
custom_constants/margin_top = 100
|
||||
custom_constants/margin_left = 400
|
||||
custom_constants/margin_bottom = 100
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="MarginContainer"]
|
||||
margin_left = 400.0
|
||||
margin_top = 100.0
|
||||
margin_right = 1520.0
|
||||
margin_bottom = 980.0
|
||||
color = Color( 0.164706, 0.180392, 0.196078, 1 )
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/ColorRect"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_constants/margin_right = 50
|
||||
custom_constants/margin_top = 50
|
||||
custom_constants/margin_left = 50
|
||||
custom_constants/margin_bottom = 50
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ColorRect/MarginContainer2"]
|
||||
margin_left = 50.0
|
||||
margin_top = 50.0
|
||||
margin_right = 1070.0
|
||||
margin_bottom = 830.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer"]
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 64.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer/CenterContainer"]
|
||||
margin_left = 478.0
|
||||
margin_right = 542.0
|
||||
margin_bottom = 64.0
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Text" type="Label" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer"]
|
||||
margin_top = 68.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 728.0
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Le jeu est en pause"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer"]
|
||||
margin_top = 732.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 780.0
|
||||
custom_constants/separation = 50
|
||||
alignment = 1
|
||||
|
||||
[node name="ExitButton" type="Button" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer/HBoxContainer"]
|
||||
margin_left = 353.0
|
||||
margin_right = 465.0
|
||||
margin_bottom = 48.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "Quitter"
|
||||
|
||||
[node name="ContinueButton" type="Button" parent="MarginContainer/ColorRect/MarginContainer2/VBoxContainer/HBoxContainer"]
|
||||
margin_left = 515.0
|
||||
margin_right = 666.0
|
||||
margin_bottom = 48.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "Continuer"
|
||||
[connection signal="pressed" from="BackgroundButton" to="." method="_on_BackgroundButton_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/ColorRect/MarginContainer2/VBoxContainer/HBoxContainer/ExitButton" to="." method="_on_ExitButton_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/ColorRect/MarginContainer2/VBoxContainer/HBoxContainer/ContinueButton" to="." method="_on_ContinueButton_pressed"]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
extends Control
|
||||
|
||||
|
||||
func _on_TextureButton_pressed():
|
||||
$PauseMenu.pause()
|
||||
141
test_story.tres
Normal file
141
test_story.tres
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
[gd_resource type="Resource" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/EXP-System-Dialog/Resource_EditorStory/EXP_EditorStory.gd" type="Script" id=1]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( 1 )
|
||||
TYPE = "EXP_Story_editor"
|
||||
names = {
|
||||
|
||||
}
|
||||
story = {
|
||||
1: {
|
||||
"available_nid": [ ],
|
||||
"groups": [ ],
|
||||
"human_readable_description": "New Dialog - Enter Human Readable Description.",
|
||||
"nodes": {
|
||||
1: {
|
||||
"graph_offset": Vector2( 120, 80 ),
|
||||
"links": {
|
||||
0: 2
|
||||
},
|
||||
"rect_size": Vector2( 324, 375 ),
|
||||
"slot_amount": 1,
|
||||
"text": "{
|
||||
\"speaker\": {
|
||||
\"id\": 1,
|
||||
\"emotion\": \"happy\"
|
||||
},
|
||||
\"scene\": {
|
||||
\"id\": 1
|
||||
},
|
||||
\"dialog\": {
|
||||
\"message\": \"Bonjour !\",
|
||||
\"choices_multiple\": [
|
||||
|
||||
]
|
||||
}
|
||||
}",
|
||||
"type": "line"
|
||||
},
|
||||
2: {
|
||||
"graph_offset": Vector2( 540, -180 ),
|
||||
"links": {
|
||||
0: 3,
|
||||
1: 4
|
||||
},
|
||||
"rect_size": Vector2( 324, 375 ),
|
||||
"slot_amount": 2,
|
||||
"text": "{
|
||||
\"speaker\": {
|
||||
\"id\": 1,
|
||||
\"emotion\": \"happy\"
|
||||
},
|
||||
\"scene\": {
|
||||
\"id\": 1
|
||||
},
|
||||
\"dialog\": {
|
||||
\"message\": \"Comment vas tu ?\",
|
||||
\"choices_multiple\": [
|
||||
{
|
||||
\"title\": \"Super !\",
|
||||
\"conditions\": [
|
||||
{
|
||||
\"id\": \"wellness\",
|
||||
\"value\": 50
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
\"title\": \"Pas ouf\",
|
||||
\"conditions\": [
|
||||
|
||||
],
|
||||
\"infobox\": {
|
||||
\"text\": \"Dire une telle chose est impensable\",
|
||||
\"conditions\": [
|
||||
{
|
||||
\"id\": \"intelligence\",
|
||||
\"value\": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}",
|
||||
"type": "line"
|
||||
},
|
||||
3: {
|
||||
"graph_offset": Vector2( 980, -60 ),
|
||||
"links": {
|
||||
|
||||
},
|
||||
"rect_size": Vector2( 324, 375 ),
|
||||
"slot_amount": 1,
|
||||
"text": "{
|
||||
\"speaker\": {
|
||||
\"id\": 1,
|
||||
\"emotion\": \"happy\"
|
||||
},
|
||||
\"scene\": {
|
||||
\"id\": 1
|
||||
},
|
||||
\"dialog\": {
|
||||
\"message\": \"Cool !\",
|
||||
\"choices_multiple\": [
|
||||
|
||||
]
|
||||
}
|
||||
}",
|
||||
"type": "line"
|
||||
},
|
||||
4: {
|
||||
"graph_offset": Vector2( 980, 460 ),
|
||||
"links": {
|
||||
|
||||
},
|
||||
"rect_size": Vector2( 324, 375 ),
|
||||
"slot_amount": 1,
|
||||
"text": "{
|
||||
\"speaker\": {
|
||||
\"id\": 1,
|
||||
\"emotion\": \"sad\"
|
||||
},
|
||||
\"scene\": {
|
||||
\"id\": 1
|
||||
},
|
||||
\"dialog\": {
|
||||
\"message\": \"Triste\",
|
||||
\"choices_multiple\": [
|
||||
|
||||
]
|
||||
}
|
||||
}",
|
||||
"type": "line"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
available_dids = [ ]
|
||||
groups = [ ]
|
||||
Loading…
Reference in a new issue