fix some things
This commit is contained in:
parent
4790230bcc
commit
8042c7becf
3
data.gd
3
data.gd
|
@ -42,5 +42,6 @@ const Themes = {
|
|||
}
|
||||
|
||||
const Images = {
|
||||
INTRO_BG = "res://img/intro_bg.png"
|
||||
INTRO_BG = "res://img/intro_bg.png",
|
||||
NEXT_BG = "res://img/next_bg.png"
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
<BRAIN> ... You wake up to the sound of sirens blaring.
|
||||
... maybe it's time to go to school?
|
||||
> SWITCH_SCENE [FIRST_SCENE]
|
||||
|
||||
>> FADE_IN_OUT [0.5, 0.5]
|
||||
> SET_BACKGROUND [NEXT_BG]
|
||||
<BRAIN> ... Looking around, it definitely wasn't time to get up just yet.
|
||||
> HIDE [background]
|
|
@ -15,8 +15,12 @@ func _ready():
|
|||
|
||||
# set up params
|
||||
dialog_box.set_dialog_path(dialog_path)
|
||||
dialog_box.set_get_character_function(funcref(self, "_on_get_character"))
|
||||
|
||||
|
||||
func _on_get_character(char_name):
|
||||
return get_parent().get_node(char_name)
|
||||
|
||||
func _on_scene_ready():
|
||||
|
||||
# init after yes
|
||||
|
|
8
game.gd
8
game.gd
|
@ -49,8 +49,16 @@ func _register_functions():
|
|||
# default VN.. functions
|
||||
current_registry["SWITCH_SCENE"] = funcref(self, "_switch_scene_fnc")
|
||||
current_registry["SET_BACKGROUND"] = funcref(self, "_set_background_fnc")
|
||||
current_registry["FADE_IN_OUT"] = funcref(self, "_fade_in_out_fnc")
|
||||
|
||||
|
||||
func _fade_in_out_fnc(args):
|
||||
if args.size() == 2:
|
||||
var time_in = float(args[0])
|
||||
var time_out = float(args[1])
|
||||
transition.start_transition(time_in, time_out)
|
||||
return [transition, "on_transition_time"]
|
||||
|
||||
func _set_background_fnc(args):
|
||||
if args.size() == 1:
|
||||
var bg_name = args[0]
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/next_bg.png-b590abc492018a55534a418f689729f4.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://img/next_bg.png"
|
||||
dest_files=[ "res://.import/next_bg.png-b590abc492018a55534a418f689729f4.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -9,7 +9,7 @@ content_margin_right = -1.0
|
|||
content_margin_top = -1.0
|
||||
content_margin_bottom = -1.0
|
||||
|
||||
[node name="main_menu" type="Control"]
|
||||
[node name="main_menu" type="Control" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[ext_resource path="res://dialog_layer.gd" type="Script" id=3]
|
||||
[ext_resource path="res://ui/dialog_box.tscn" type="PackedScene" id=4]
|
||||
|
||||
[node name="intro" type="Node2D"]
|
||||
[node name="intro" type="Node2D" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ const TRANSITION_TIME = 1.0
|
|||
func _ready():
|
||||
pass
|
||||
|
||||
func start_transition():
|
||||
func start_transition(time_in = TRANSITION_TIME, time_out = TRANSITION_TIME):
|
||||
|
||||
tween.interpolate_property(
|
||||
background, "color:a", background.color.a, 1.0,
|
||||
|
|
|
@ -179,7 +179,7 @@ func _set_expr_fnc(args):
|
|||
|
||||
func _show_char(args):
|
||||
var char_name = args[0]
|
||||
var character = get_node_fnc.call(char_name)
|
||||
var character = get_node_fnc.call_func(char_name)
|
||||
_do_show_char(character)
|
||||
|
||||
func _do_show_char(c):
|
||||
|
@ -192,7 +192,7 @@ func _do_show_char(c):
|
|||
|
||||
func _hide_char(args):
|
||||
var char_name = args[0]
|
||||
var character = get_node_fnc.call(char_name)
|
||||
var character = get_node_fnc.call_func(char_name)
|
||||
_do_hide_char(character)
|
||||
|
||||
func _do_hide_char(c):
|
||||
|
@ -205,7 +205,7 @@ func _do_hide_char(c):
|
|||
|
||||
func _flip_char(args):
|
||||
var char_name = args[0]
|
||||
var character = get_node_fnc.call(char_name)
|
||||
var character = get_node_fnc.call_func(char_name)
|
||||
_do_flip_char(character)
|
||||
|
||||
func _do_flip_char(c):
|
||||
|
|
Loading…
Reference in New Issue