initialisation
0
README.md
Normal file
BIN
addons/input_map_button/icon.png
Normal file
After Width: | Height: | Size: 620 B |
29
addons/input_map_button/icon.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-c47ceb75fff2a2778c3061d0eaa91f57.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/input_map_button/icon.png"
|
||||
dest_files=[ "res://.import/icon.png-c47ceb75fff2a2778c3061d0eaa91f57.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
|
12
addons/input_map_button/input_map_button.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
tool
|
||||
extends EditorPlugin
|
||||
|
||||
func _enter_tree():
|
||||
# Initialization of the plugin goes here
|
||||
# Add the new type with a name, a parent type, a script and an icon
|
||||
add_custom_type("input_map_button_node", "HBoxContainer", preload("input_map_button_node.gd"), preload("icon.png"))
|
||||
|
||||
func _exit_tree():
|
||||
# Clean-up of the plugin goes here
|
||||
# Always remember to remove it from the engine when deactivated
|
||||
remove_custom_type("input_map_button_node")
|
187
addons/input_map_button/input_map_button_node.gd
Normal file
|
@ -0,0 +1,187 @@
|
|||
tool
|
||||
extends HBoxContainer
|
||||
|
||||
export(String) var action_name = ""
|
||||
export(String) var description = "Lorem ipsum."
|
||||
export(String) var config_file = "user://input.cfg"
|
||||
|
||||
func _enter_tree():
|
||||
|
||||
if not self.has_node( "description" ):
|
||||
var new_label = Label.new()
|
||||
new_label.name = "description"
|
||||
new_label.text = description
|
||||
new_label.align = HALIGN_RIGHT
|
||||
new_label.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||
new_label.size_flags_vertical = SIZE_EXPAND
|
||||
self.add_child( new_label )
|
||||
new_label.set_owner( self )
|
||||
|
||||
if not self.has_node( "keyboard" ):
|
||||
var new_button = Button.new()
|
||||
new_button.name = "keyboard"
|
||||
new_button.align = HALIGN_LEFT
|
||||
new_button.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||
new_button.size_flags_vertical = SIZE_EXPAND
|
||||
self.add_child( new_button )
|
||||
new_button.set_owner( self )
|
||||
#
|
||||
if not self.has_node( "joypad" ):
|
||||
var new_button_joypad = Button.new()
|
||||
new_button_joypad.name = "joypad"
|
||||
new_button_joypad.align = HALIGN_LEFT
|
||||
new_button_joypad.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||
new_button_joypad.size_flags_vertical = SIZE_EXPAND
|
||||
self.add_child( new_button_joypad )
|
||||
new_button_joypad.set_owner( self )
|
||||
|
||||
func get_event_with_modifier_from_string( scancode, type ):
|
||||
if type == "keyboard":
|
||||
var new_event = InputEventKey.new()
|
||||
|
||||
if not scancode.find( "Meta" ) == -1:
|
||||
new_event.meta = true
|
||||
if not scancode.find( "Control" ) == -1:
|
||||
new_event.control = true
|
||||
if not scancode.find( "Alt" ) == -1:
|
||||
new_event.alt = true
|
||||
if not scancode.find( "Shift" ) == -1:
|
||||
new_event.shift = true
|
||||
|
||||
if not scancode.findn( "+" ) == -1:
|
||||
scancode = scancode.right(scancode.find_last( "+" )+1)
|
||||
|
||||
new_event.scancode = OS.find_scancode_from_string( scancode )
|
||||
return new_event
|
||||
elif type == "joypad":
|
||||
var new_event = InputEventJoypadButton.new()
|
||||
|
||||
new_event.button_index = Input.get_joy_button_index_from_string( scancode )
|
||||
return new_event
|
||||
return null
|
||||
|
||||
func load_from_config():
|
||||
var config = ConfigFile.new()
|
||||
var err = config.load( config_file )
|
||||
if err:# Assuming that file is missing, generate default config
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventKey:
|
||||
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||
config.set_value("keyboard", action_name, scancode)
|
||||
elif event is InputEventJoypadButton:
|
||||
var joy_button_name = Input.get_joy_button_string( event.button_index )
|
||||
config.set_value("joypad", action_name, joy_button_name)
|
||||
config.save( config_file )
|
||||
else:
|
||||
var action_found = false
|
||||
for action in config.get_section_keys("keyboard"):
|
||||
if action == action_name:
|
||||
action_found = true
|
||||
var event = get_event_with_modifier_from_string( config.get_value("keyboard", action_name), "keyboard")
|
||||
for old_event in InputMap.get_action_list( action_name ):
|
||||
if old_event is InputEventKey:
|
||||
InputMap.action_erase_event(action_name, old_event)
|
||||
InputMap.action_add_event(action_name, event)
|
||||
break
|
||||
if not action_found:
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventKey:
|
||||
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||
config.set_value("keyboard", action_name, scancode)
|
||||
|
||||
|
||||
action_found = false
|
||||
for action in config.get_section_keys("joypad"):
|
||||
if action == action_name:
|
||||
action_found = true
|
||||
var event = get_event_with_modifier_from_string( config.get_value("joypad", action_name), "joypad")
|
||||
for old_event in InputMap.get_action_list( action_name ):
|
||||
if old_event is InputEventJoypadButton:
|
||||
InputMap.action_erase_event(action_name, old_event)
|
||||
InputMap.action_add_event(action_name, event)
|
||||
|
||||
if not action_found:
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventJoypadButton:
|
||||
var joy_button_name = Input.get_joy_button_string( event.button_index )
|
||||
config.set_value("joypad", action_name, joy_button_name)
|
||||
|
||||
config.save( config_file )
|
||||
|
||||
|
||||
|
||||
func save_to_config(section, key, value):
|
||||
var config = ConfigFile.new()
|
||||
var err = config.load( config_file )
|
||||
if err:
|
||||
print("Error code when loading config file: ", err)
|
||||
else:
|
||||
config.set_value(section, key, value)
|
||||
config.save( config_file )
|
||||
|
||||
|
||||
# Input management
|
||||
func wait_for_input():
|
||||
set_process_input(true)
|
||||
|
||||
# Input management
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey and not event.pressed and not event.is_echo():
|
||||
var input_string = OS.get_scancode_string( event.scancode )
|
||||
|
||||
if not event.is_action("ui_cancel") \
|
||||
and not input_string == "Meta" \
|
||||
and not input_string == "Control" \
|
||||
and not input_string == "Alt" \
|
||||
and not input_string == "Shift" \
|
||||
:
|
||||
get_tree().set_input_as_handled()
|
||||
set_process_input( false )
|
||||
|
||||
$keyboard.text = ""
|
||||
if event.meta:
|
||||
$keyboard.text += "Meta+"
|
||||
if event.control:
|
||||
$keyboard.text += "Control+"
|
||||
if event.alt:
|
||||
$keyboard.text += "Alt+"
|
||||
if event.shift:
|
||||
$keyboard.text += "Shift+"
|
||||
$keyboard.text += input_string
|
||||
|
||||
for old_event in InputMap.get_action_list( action_name ):
|
||||
if old_event is InputEventKey:
|
||||
InputMap.action_erase_event(action_name, old_event)
|
||||
|
||||
InputMap.action_add_event(action_name, event)
|
||||
save_to_config("keyboard", action_name, $keyboard.text)
|
||||
|
||||
elif event is InputEventJoypadButton and not event.pressed and not event.is_echo():
|
||||
var input_string = Input.get_joy_button_string( event.button_index )
|
||||
|
||||
get_tree().set_input_as_handled()
|
||||
set_process_input( false )
|
||||
|
||||
$joypad.text = input_string
|
||||
for old_event in InputMap.get_action_list( action_name ):
|
||||
if old_event is InputEventJoypadButton:
|
||||
InputMap.action_erase_event(action_name, old_event)
|
||||
InputMap.action_add_event(action_name, event)
|
||||
save_to_config("joypad", action_name, $joypad.text)
|
||||
|
||||
|
||||
func _ready():
|
||||
|
||||
load_from_config()
|
||||
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventKey:
|
||||
$keyboard.text = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||
elif event is InputEventJoypadButton:
|
||||
$joypad.text = Input.get_joy_button_string( event.button_index )
|
||||
|
||||
$keyboard.connect( "pressed", self, "wait_for_input" )
|
||||
$joypad.connect( "pressed", self, "wait_for_input" )
|
||||
|
||||
set_process_input(false)
|
7
addons/input_map_button/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
|||
[plugin]
|
||||
|
||||
name="Input map button"
|
||||
description="A custom node to help the making of a key remapping menu."
|
||||
author="Osquallo"
|
||||
version="1.0.0"
|
||||
script="input_map_button.gd"
|
BIN
assets/GUI/fonts/ryzom.ttf
Normal file
BIN
assets/GUI/fonts/ryzom_monospace.ttf
Normal file
BIN
assets/GUI/images/bg1.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
29
assets/GUI/images/bg1.jpg.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/bg1.jpg-62fc1eb5b586a7795f2321ddfcc3ee99.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/bg1.jpg"
|
||||
dest_files=[ "res://.import/bg1.jpg-62fc1eb5b586a7795f2321ddfcc3ee99.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
|
BIN
assets/GUI/images/bg2.jpg
Normal file
After Width: | Height: | Size: 242 KiB |
29
assets/GUI/images/bg2.jpg.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/bg2.jpg-b2f660962e3a46240446aab06983a831.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/bg2.jpg"
|
||||
dest_files=[ "res://.import/bg2.jpg-b2f660962e3a46240446aab06983a831.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=1
|
||||
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
|
BIN
assets/GUI/images/bg_borderless.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
29
assets/GUI/images/bg_borderless.jpg.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/bg_borderless.jpg-75510b5d2cfca15ea563ab7966a68e8b.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/bg_borderless.jpg"
|
||||
dest_files=[ "res://.import/bg_borderless.jpg-75510b5d2cfca15ea563ab7966a68e8b.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
|
BIN
assets/GUI/images/button_close.png
Normal file
After Width: | Height: | Size: 520 B |
29
assets/GUI/images/button_close.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_close.png-4797019383a691096b159f84a648832c.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/button_close.png"
|
||||
dest_files=[ "res://.import/button_close.png-4797019383a691096b159f84a648832c.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
|
BIN
assets/GUI/images/button_move.png
Normal file
After Width: | Height: | Size: 674 B |
29
assets/GUI/images/button_move.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_move.png-532099318a86b2038b998ddd2875496c.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/button_move.png"
|
||||
dest_files=[ "res://.import/button_move.png-532099318a86b2038b998ddd2875496c.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
|
BIN
assets/GUI/images/button_open.png
Normal file
After Width: | Height: | Size: 604 B |
29
assets/GUI/images/button_open.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_open.png-7824b6d39aff1d96e19cd2753aed9fe2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/button_open.png"
|
||||
dest_files=[ "res://.import/button_open.png-7824b6d39aff1d96e19cd2753aed9fe2.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
|
BIN
assets/GUI/images/button_quit.png
Normal file
After Width: | Height: | Size: 605 B |
29
assets/GUI/images/button_quit.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_quit.png-2b2d83ab2cd0b5d3427aa32b18ba522f.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/button_quit.png"
|
||||
dest_files=[ "res://.import/button_quit.png-2b2d83ab2cd0b5d3427aa32b18ba522f.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
|
BIN
assets/GUI/images/button_resize.png
Normal file
After Width: | Height: | Size: 514 B |
29
assets/GUI/images/button_resize.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_resize.png-49f3fee4aa800f70768831898aa4a0cc.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/button_resize.png"
|
||||
dest_files=[ "res://.import/button_resize.png-49f3fee4aa800f70768831898aa4a0cc.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
|
BIN
assets/GUI/images/khaganat_logo_color.png
Normal file
After Width: | Height: | Size: 13 KiB |
29
assets/GUI/images/khaganat_logo_color.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/khaganat_logo_color.png-cb69122f106105fab2e4f1370bd3e815.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/khaganat_logo_color.png"
|
||||
dest_files=[ "res://.import/khaganat_logo_color.png-cb69122f106105fab2e4f1370bd3e815.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
|
BIN
assets/GUI/images/khanat_logo_color.png
Normal file
After Width: | Height: | Size: 62 KiB |
29
assets/GUI/images/khanat_logo_color.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/khanat_logo_color.png-4c42c8a2a774982fdc40e61c8da9c7f4.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/khanat_logo_color.png"
|
||||
dest_files=[ "res://.import/khanat_logo_color.png-4c42c8a2a774982fdc40e61c8da9c7f4.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
|
BIN
assets/GUI/images/new_launcher_bg_0-1.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
29
assets/GUI/images/new_launcher_bg_0-1.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/new_launcher_bg_0-1.png-f9bd5fccfcac7eb71c7c57a058e15962.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/GUI/images/new_launcher_bg_0-1.png"
|
||||
dest_files=[ "res://.import/new_launcher_bg_0-1.png-f9bd5fccfcac7eb71c7c57a058e15962.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
|
BIN
assets/Game/Brick08/Bricks08_AO.jpg
Normal file
After Width: | Height: | Size: 910 KiB |
30
assets/Game/Brick08/Bricks08_AO.jpg.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/Bricks08_AO.jpg-0bed8a73ed5d0f366925026e08e78633.s3tc.stex"
|
||||
path.etc2="res://.import/Bricks08_AO.jpg-0bed8a73ed5d0f366925026e08e78633.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/Brick08/Bricks08_AO.jpg"
|
||||
dest_files=[ "res://.import/Bricks08_AO.jpg-0bed8a73ed5d0f366925026e08e78633.s3tc.stex", "res://.import/Bricks08_AO.jpg-0bed8a73ed5d0f366925026e08e78633.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
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=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/Brick08/Bricks08_col.jpg
Normal file
After Width: | Height: | Size: 3.5 MiB |
30
assets/Game/Brick08/Bricks08_col.jpg.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/Bricks08_col.jpg-847f39e29b686be46f9011c3a797d966.s3tc.stex"
|
||||
path.etc2="res://.import/Bricks08_col.jpg-847f39e29b686be46f9011c3a797d966.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/Brick08/Bricks08_col.jpg"
|
||||
dest_files=[ "res://.import/Bricks08_col.jpg-847f39e29b686be46f9011c3a797d966.s3tc.stex", "res://.import/Bricks08_col.jpg-847f39e29b686be46f9011c3a797d966.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/Brick08/Bricks08_disp.jpg
Normal file
After Width: | Height: | Size: 637 KiB |
30
assets/Game/Brick08/Bricks08_disp.jpg.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/Bricks08_disp.jpg-5c54c4121b3d3f71a7938ba4e3fc6578.s3tc.stex"
|
||||
path.etc2="res://.import/Bricks08_disp.jpg-5c54c4121b3d3f71a7938ba4e3fc6578.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/Brick08/Bricks08_disp.jpg"
|
||||
dest_files=[ "res://.import/Bricks08_disp.jpg-5c54c4121b3d3f71a7938ba4e3fc6578.s3tc.stex", "res://.import/Bricks08_disp.jpg-5c54c4121b3d3f71a7938ba4e3fc6578.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
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=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/Brick08/Bricks08_nrm.jpg
Normal file
After Width: | Height: | Size: 6.2 MiB |
30
assets/Game/Brick08/Bricks08_nrm.jpg.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/Bricks08_nrm.jpg-424b57dd4f1f085663f4f3535e5e12f9.s3tc.stex"
|
||||
path.etc2="res://.import/Bricks08_nrm.jpg-424b57dd4f1f085663f4f3535e5e12f9.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/Brick08/Bricks08_nrm.jpg"
|
||||
dest_files=[ "res://.import/Bricks08_nrm.jpg-424b57dd4f1f085663f4f3535e5e12f9.s3tc.stex", "res://.import/Bricks08_nrm.jpg-424b57dd4f1f085663f4f3535e5e12f9.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=1
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
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=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/Brick08/Bricks08_rgh.jpg
Normal file
After Width: | Height: | Size: 2 MiB |
30
assets/Game/Brick08/Bricks08_rgh.jpg.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/Bricks08_rgh.jpg-d6c5268d812afc667625d535694afb2b.s3tc.stex"
|
||||
path.etc2="res://.import/Bricks08_rgh.jpg-d6c5268d812afc667625d535694afb2b.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/Brick08/Bricks08_rgh.jpg"
|
||||
dest_files=[ "res://.import/Bricks08_rgh.jpg-d6c5268d812afc667625d535694afb2b.s3tc.stex", "res://.import/Bricks08_rgh.jpg-d6c5268d812afc667625d535694afb2b.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
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=false
|
||||
svg/scale=1.0
|
69
assets/Game/materials/flamme_01.tres
Normal file
|
@ -0,0 +1,69 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/textures/fire_01.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = false
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 2
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.390625, 0.390625, 0.390625, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 1, 0.886353, 0.617188, 1 )
|
||||
emission_energy = 1.0
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Parameters", "Particles Anim" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
size = Vector2( 0.4, 0.4 )
|
||||
|
71
assets/Game/materials/flamme_02.tres
Normal file
|
@ -0,0 +1,71 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://textures/fire_02.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 2
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.230469, 0.230469, 0.230469, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 0.882812, 0.676712, 0.355194, 1 )
|
||||
emission_energy = 1.0
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
emission_texture = ExtResource( 1 )
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Parameters", "Particles Anim" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector2( 0.08, 0.08 )
|
||||
|
71
assets/Game/materials/flamme_03.tres
Normal file
|
@ -0,0 +1,71 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://textures/fire_03.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 2
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.230469, 0.230469, 0.230469, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 0.882812, 0.676712, 0.355194, 1 )
|
||||
emission_energy = 1.0
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
emission_texture = ExtResource( 1 )
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Parameters", "Particles Anim" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector2( 0.08, 0.08 )
|
||||
|
65
assets/Game/materials/ps_fire_01.tres
Normal file
|
@ -0,0 +1,65 @@
|
|||
[gd_resource type="ParticlesMaterial" load_steps=5 format=2]
|
||||
|
||||
[sub_resource type="Curve" id=1]
|
||||
|
||||
min_value = -360.0
|
||||
max_value = 360.0
|
||||
bake_resolution = 100
|
||||
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.959245, 38.6719 ), 89.2918, 89.2918, 0, 0, Vector2( 1, 324.844 ), 17644.8, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
width = 2048
|
||||
curve = SubResource( 1 )
|
||||
|
||||
[sub_resource type="Gradient" id=3]
|
||||
|
||||
offsets = PoolRealArray( 0, 0.0788644, 0.514196, 0.851735, 1 )
|
||||
colors = PoolColorArray( 1, 1, 1, 0.359098, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.911608, 1, 1, 1, 0 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=4]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 3 )
|
||||
width = 2048
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 1
|
||||
emission_shape = 2
|
||||
emission_box_extents = Vector3( 0.07, 0.07, 0.07 )
|
||||
flag_align_y = false
|
||||
flag_rotate_y = false
|
||||
flag_disable_z = false
|
||||
spread = 2.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, 0.05, 0 )
|
||||
initial_velocity = 0.0
|
||||
initial_velocity_random = 0.0
|
||||
angular_velocity = 35.0
|
||||
angular_velocity_random = 1.0
|
||||
angular_velocity_curve = SubResource( 2 )
|
||||
linear_accel = 0.01
|
||||
linear_accel_random = 0.0
|
||||
radial_accel = 0.0
|
||||
radial_accel_random = 0.0
|
||||
tangential_accel = 0.0
|
||||
tangential_accel_random = 0.06
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 10.0
|
||||
angle_random = 0.0
|
||||
scale = 1.0
|
||||
scale_random = 0.0
|
||||
color_ramp = SubResource( 4 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 50.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.14
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = true
|
||||
_sections_unfolded = [ "Angle", "Angular Velocity", "Animation", "Color", "Damping", "Emission Shape", "Flags", "Gravity", "Hue Variation", "Initial Velocity", "Linear Accel", "Radial Accel", "Resource", "Scale", "Spread", "Tangential Accel", "Trail" ]
|
||||
|
68
assets/Game/materials/ps_fire_02.tres
Normal file
|
@ -0,0 +1,68 @@
|
|||
[gd_resource type="ParticlesMaterial" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://materials/ps_fire_size_curve.tres" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="Curve" id=1]
|
||||
|
||||
min_value = -360.0
|
||||
max_value = 360.0
|
||||
bake_resolution = 100
|
||||
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.959245, 38.6719 ), 89.2918, 89.2918, 0, 0, Vector2( 1, 324.844 ), 17644.8, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
width = 2048
|
||||
curve = SubResource( 1 )
|
||||
|
||||
[sub_resource type="Gradient" id=3]
|
||||
|
||||
offsets = PoolRealArray( 0, 0.0788644, 0.514196, 0.851735, 1 )
|
||||
colors = PoolColorArray( 1, 1, 1, 0.359098, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.911608, 1, 1, 1, 0 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=4]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 3 )
|
||||
width = 2048
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 1
|
||||
emission_shape = 2
|
||||
emission_box_extents = Vector3( 0.09, 0.09, 0.03 )
|
||||
flag_align_y = false
|
||||
flag_rotate_y = false
|
||||
flag_disable_z = false
|
||||
spread = 2.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, 0.06, 0 )
|
||||
initial_velocity = 0.0
|
||||
initial_velocity_random = 0.0
|
||||
angular_velocity = -45.0
|
||||
angular_velocity_random = 1.0
|
||||
angular_velocity_curve = SubResource( 2 )
|
||||
linear_accel = 0.01
|
||||
linear_accel_random = 0.0
|
||||
radial_accel = 0.0
|
||||
radial_accel_random = 0.82
|
||||
tangential_accel = 0.0
|
||||
tangential_accel_random = 0.06
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 0.0
|
||||
angle_random = 0.0
|
||||
scale = 1.0
|
||||
scale_random = 0.0
|
||||
scale_curve = ExtResource( 1 )
|
||||
color_ramp = SubResource( 4 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 50.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.14
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = false
|
||||
_sections_unfolded = [ "Angle", "Angular Velocity", "Animation", "Color", "Damping", "Emission Shape", "Flags", "Gravity", "Hue Variation", "Initial Velocity", "Linear Accel", "Radial Accel", "Scale", "Spread", "Tangential Accel", "Trail" ]
|
||||
|
15
assets/Game/materials/ps_fire_size_curve.tres
Normal file
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="CurveTexture" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="Curve" id=1]
|
||||
|
||||
min_value = 0.0
|
||||
max_value = 1.0
|
||||
bake_resolution = 100
|
||||
_data = [ Vector2( 0, 0 ), 0.0, 1.38386, 0, 0, Vector2( 0.0995908, 0.909802 ), 0.984772, 0.984772, 0, 0, Vector2( 0.387232, 1 ), -0.610271, -0.610271, 0, 0, Vector2( 1, 0 ), 0.505501, 0.0, 0, 0 ]
|
||||
|
||||
[resource]
|
||||
|
||||
flags = 4
|
||||
width = 128
|
||||
curve = SubResource( 1 )
|
||||
|
79
assets/Game/materials/ps_smoke_01.tres
Normal file
|
@ -0,0 +1,79 @@
|
|||
[gd_resource type="ParticlesMaterial" load_steps=7 format=2]
|
||||
|
||||
[sub_resource type="Gradient" id=1]
|
||||
|
||||
offsets = PoolRealArray( 0, 0.293375, 1 )
|
||||
colors = PoolColorArray( 1, 1, 1, 0, 1, 1, 1, 1, 0.949527, 0.949527, 0.949527, 0 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 1 )
|
||||
width = 128
|
||||
|
||||
[sub_resource type="Curve" id=3]
|
||||
|
||||
min_value = 0.0
|
||||
max_value = 1.0
|
||||
bake_resolution = 100
|
||||
_data = [ Vector2( 0, 0.40332 ), 0.0, -0.404933, 0, 1, Vector2( 0.996017, 0 ), -2.26433, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=4]
|
||||
|
||||
flags = 4
|
||||
width = 128
|
||||
curve = SubResource( 3 )
|
||||
|
||||
[sub_resource type="Curve" id=5]
|
||||
|
||||
min_value = 0.0
|
||||
max_value = 1.0
|
||||
bake_resolution = 100
|
||||
_data = [ Vector2( 0, 0 ), 0.0, 0.928107, 0, 0, Vector2( 0.365168, 0.618164 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.500372, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=6]
|
||||
|
||||
flags = 4
|
||||
width = 128
|
||||
curve = SubResource( 5 )
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 1
|
||||
emission_shape = 2
|
||||
emission_box_extents = Vector3( 0.05, 0.05, 0.05 )
|
||||
flag_align_y = false
|
||||
flag_rotate_y = false
|
||||
flag_disable_z = false
|
||||
spread = 1.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, 0.3, 0 )
|
||||
initial_velocity = 0.0
|
||||
initial_velocity_random = 0.0
|
||||
angular_velocity = 50.0
|
||||
angular_velocity_random = 1.0
|
||||
linear_accel = 0.1
|
||||
linear_accel_random = 0.0
|
||||
linear_accel_curve = SubResource( 4 )
|
||||
radial_accel = 0.01
|
||||
radial_accel_random = 0.0
|
||||
tangential_accel = 0.01
|
||||
tangential_accel_random = 0.0
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 5.0
|
||||
angle_random = 0.0
|
||||
scale = 1.5
|
||||
scale_random = 0.1
|
||||
scale_curve = SubResource( 6 )
|
||||
color_ramp = SubResource( 2 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 0.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.0
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = false
|
||||
_sections_unfolded = [ "Angle", "Angular Velocity", "Animation", "Color", "Damping", "Emission Shape", "Flags", "Gravity", "Hue Variation", "Initial Velocity", "Linear Accel", "Radial Accel", "Scale", "Spread", "Tangential Accel", "Trail" ]
|
||||
|
66
assets/Game/materials/smoke_mesh_01.tres
Normal file
|
@ -0,0 +1,66 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/textures/smoke_1.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.203125, 0.203125, 0.203125, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
size = Vector2( 1, 1 )
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
66
assets/Game/materials/smoke_mesh_02.tres
Normal file
|
@ -0,0 +1,66 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/textures/smoke_2.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.203125, 0.203125, 0.203125, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
size = Vector2( 1, 1 )
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
66
assets/Game/materials/smoke_mesh_04.tres
Normal file
|
@ -0,0 +1,66 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/textures/smoke_4.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.203125, 0.203125, 0.203125, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
size = Vector2( 1, 1 )
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
66
assets/Game/materials/smoke_mesh_05.tres
Normal file
|
@ -0,0 +1,66 @@
|
|||
[gd_resource type="QuadMesh" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/textures/smoke_5.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.203125, 0.203125, 0.203125, 1 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
||||
[resource]
|
||||
|
||||
material = SubResource( 1 )
|
||||
size = Vector2( 1, 1 )
|
||||
_sections_unfolded = [ "Albedo", "Flags", "Parameters" ]
|
||||
|
BIN
assets/Game/textures/fire_01.png
Normal file
After Width: | Height: | Size: 10 KiB |
30
assets/Game/textures/fire_01.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/fire_01.png-c426a86dc95546cf2110e49fcd0c6788.s3tc.stex"
|
||||
path.etc2="res://.import/fire_01.png-c426a86dc95546cf2110e49fcd0c6788.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/fire_01.png"
|
||||
dest_files=[ "res://.import/fire_01.png-c426a86dc95546cf2110e49fcd0c6788.s3tc.stex", "res://.import/fire_01.png-c426a86dc95546cf2110e49fcd0c6788.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/fire_02.png
Normal file
After Width: | Height: | Size: 10 KiB |
30
assets/Game/textures/fire_02.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/fire_02.png-d974419fc659891b249eff155e185b02.s3tc.stex"
|
||||
path.etc2="res://.import/fire_02.png-d974419fc659891b249eff155e185b02.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/fire_02.png"
|
||||
dest_files=[ "res://.import/fire_02.png-d974419fc659891b249eff155e185b02.s3tc.stex", "res://.import/fire_02.png-d974419fc659891b249eff155e185b02.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/fire_03.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
30
assets/Game/textures/fire_03.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/fire_03.png-6705134dcfcba0bc38d18847de098b0c.s3tc.stex"
|
||||
path.etc2="res://.import/fire_03.png-6705134dcfcba0bc38d18847de098b0c.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/fire_03.png"
|
||||
dest_files=[ "res://.import/fire_03.png-6705134dcfcba0bc38d18847de098b0c.s3tc.stex", "res://.import/fire_03.png-6705134dcfcba0bc38d18847de098b0c.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/smoke_1.png
Normal file
After Width: | Height: | Size: 26 KiB |
30
assets/Game/textures/smoke_1.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/smoke_1.png-335329d1679284b3ecb06c4f0dae901b.s3tc.stex"
|
||||
path.etc2="res://.import/smoke_1.png-335329d1679284b3ecb06c4f0dae901b.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/smoke_1.png"
|
||||
dest_files=[ "res://.import/smoke_1.png-335329d1679284b3ecb06c4f0dae901b.s3tc.stex", "res://.import/smoke_1.png-335329d1679284b3ecb06c4f0dae901b.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/smoke_2.png
Normal file
After Width: | Height: | Size: 18 KiB |
30
assets/Game/textures/smoke_2.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/smoke_2.png-4d94d91d73c5ca11557abd1a82ed218d.s3tc.stex"
|
||||
path.etc2="res://.import/smoke_2.png-4d94d91d73c5ca11557abd1a82ed218d.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/smoke_2.png"
|
||||
dest_files=[ "res://.import/smoke_2.png-4d94d91d73c5ca11557abd1a82ed218d.s3tc.stex", "res://.import/smoke_2.png-4d94d91d73c5ca11557abd1a82ed218d.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/smoke_3.png
Normal file
After Width: | Height: | Size: 32 KiB |
30
assets/Game/textures/smoke_3.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/smoke_3.png-799aa548fe979a021a448762731021ac.s3tc.stex"
|
||||
path.etc2="res://.import/smoke_3.png-799aa548fe979a021a448762731021ac.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/smoke_3.png"
|
||||
dest_files=[ "res://.import/smoke_3.png-799aa548fe979a021a448762731021ac.s3tc.stex", "res://.import/smoke_3.png-799aa548fe979a021a448762731021ac.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/smoke_4.png
Normal file
After Width: | Height: | Size: 20 KiB |
30
assets/Game/textures/smoke_4.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/smoke_4.png-b1e52e010af857e5f1da4df9215e72a3.s3tc.stex"
|
||||
path.etc2="res://.import/smoke_4.png-b1e52e010af857e5f1da4df9215e72a3.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/smoke_4.png"
|
||||
dest_files=[ "res://.import/smoke_4.png-b1e52e010af857e5f1da4df9215e72a3.s3tc.stex", "res://.import/smoke_4.png-b1e52e010af857e5f1da4df9215e72a3.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/Game/textures/smoke_5.png
Normal file
After Width: | Height: | Size: 20 KiB |
30
assets/Game/textures/smoke_5.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/smoke_5.png-1ecd5a748e33a80b75ceb2a06367ce61.s3tc.stex"
|
||||
path.etc2="res://.import/smoke_5.png-1ecd5a748e33a80b75ceb2a06367ce61.etc2.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Game/textures/smoke_5.png"
|
||||
dest_files=[ "res://.import/smoke_5.png-1ecd5a748e33a80b75ceb2a06367ce61.s3tc.stex", "res://.import/smoke_5.png-1ecd5a748e33a80b75ceb2a06367ce61.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
BIN
assets/test/musiques/Sangakanat (short instrumental theme).ogg
Normal file
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Sangakanat (short instrumental theme).ogg-52c25fbb38c3065b0cffacad1b8998a9.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/test/musiques/Sangakanat (short instrumental theme).ogg"
|
||||
dest_files=[ "res://.import/Sangakanat (short instrumental theme).ogg-52c25fbb38c3065b0cffacad1b8998a9.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
BIN
assets/test/musiques/pre-mix_khanat_main_theme_2018-07-23.ogg
Normal file
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/pre-mix_khanat_main_theme_2018-07-23.ogg-4e4bac5171fbf60799e71b6a16d07fd3.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/test/musiques/pre-mix_khanat_main_theme_2018-07-23.ogg"
|
||||
dest_files=[ "res://.import/pre-mix_khanat_main_theme_2018-07-23.ogg-4e4bac5171fbf60799e71b6a16d07fd3.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
102
default_env.tres
Normal file
|
@ -0,0 +1,102 @@
|
|||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
radiance_size = 4
|
||||
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
|
||||
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
|
||||
sky_curve = 0.25
|
||||
sky_energy = 1.0
|
||||
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
|
||||
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
|
||||
ground_curve = 0.01
|
||||
ground_energy = 1.0
|
||||
sun_color = Color( 1, 1, 1, 1 )
|
||||
sun_latitude = 35.0
|
||||
sun_longitude = 0.0
|
||||
sun_angle_min = 1.0
|
||||
sun_angle_max = 100.0
|
||||
sun_curve = 0.05
|
||||
sun_energy = 16.0
|
||||
texture_size = 2
|
||||
|
||||
[resource]
|
||||
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
background_sky_custom_fov = 0.0
|
||||
background_color = Color( 0, 0, 0, 1 )
|
||||
background_energy = 1.0
|
||||
background_canvas_max_layer = 0
|
||||
ambient_light_color = Color( 0, 0, 0, 1 )
|
||||
ambient_light_energy = 1.0
|
||||
ambient_light_sky_contribution = 1.0
|
||||
fog_enabled = false
|
||||
fog_color = Color( 0.5, 0.6, 0.7, 1 )
|
||||
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
|
||||
fog_sun_amount = 0.0
|
||||
fog_depth_enabled = false
|
||||
fog_depth_begin = 10.0
|
||||
fog_depth_curve = 1.0
|
||||
fog_transmit_enabled = false
|
||||
fog_transmit_curve = 1.0
|
||||
fog_height_enabled = false
|
||||
fog_height_min = 0.0
|
||||
fog_height_max = 100.0
|
||||
fog_height_curve = 1.0
|
||||
tonemap_mode = 2
|
||||
tonemap_exposure = 1.0
|
||||
tonemap_white = 1.0
|
||||
auto_exposure_enabled = false
|
||||
auto_exposure_scale = 0.4
|
||||
auto_exposure_min_luma = 0.05
|
||||
auto_exposure_max_luma = 8.0
|
||||
auto_exposure_speed = 0.5
|
||||
ss_reflections_enabled = true
|
||||
ss_reflections_max_steps = 64
|
||||
ss_reflections_fade_in = 0.15
|
||||
ss_reflections_fade_out = 2.0
|
||||
ss_reflections_depth_tolerance = 0.2
|
||||
ss_reflections_roughness = true
|
||||
ssao_enabled = true
|
||||
ssao_radius = 1.0
|
||||
ssao_intensity = 1.0
|
||||
ssao_radius2 = 0.0
|
||||
ssao_intensity2 = 1.0
|
||||
ssao_bias = 0.01
|
||||
ssao_light_affect = 0.0
|
||||
ssao_color = Color( 0, 0, 0, 1 )
|
||||
ssao_quality = 1
|
||||
ssao_blur = 3
|
||||
ssao_edge_sharpness = 4.0
|
||||
dof_blur_far_enabled = false
|
||||
dof_blur_far_distance = 10.0
|
||||
dof_blur_far_transition = 5.0
|
||||
dof_blur_far_amount = 0.1
|
||||
dof_blur_far_quality = 1
|
||||
dof_blur_near_enabled = false
|
||||
dof_blur_near_distance = 2.0
|
||||
dof_blur_near_transition = 1.0
|
||||
dof_blur_near_amount = 0.1
|
||||
dof_blur_near_quality = 1
|
||||
glow_enabled = false
|
||||
glow_levels/1 = false
|
||||
glow_levels/2 = false
|
||||
glow_levels/3 = true
|
||||
glow_levels/4 = false
|
||||
glow_levels/5 = true
|
||||
glow_levels/6 = false
|
||||
glow_levels/7 = false
|
||||
glow_intensity = 0.8
|
||||
glow_strength = 1.0
|
||||
glow_bloom = 0.2
|
||||
glow_blend_mode = 2
|
||||
glow_hdr_threshold = 1.0
|
||||
glow_hdr_scale = 2.0
|
||||
glow_bicubic_upscale = false
|
||||
adjustment_enabled = false
|
||||
adjustment_brightness = 1.0
|
||||
adjustment_contrast = 1.0
|
||||
adjustment_saturation = 1.0
|
||||
_sections_unfolded = [ "Adjustments", "Ambient Light", "Auto Exposure", "Background", "DOF Far Blur", "DOF Near Blur", "Fog", "Glow", "SS Reflections", "SSAO", "Tonemap" ]
|
||||
|
BIN
icon.png
Normal file
After Width: | Height: | Size: 62 KiB |
29
icon.png.import
Normal file
|
@ -0,0 +1,29 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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
|
76
project.godot
Normal file
|
@ -0,0 +1,76 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=3
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Khanat"
|
||||
run/main_scene="res://scenes/Main.tscn"
|
||||
boot_splash/image="res://assets/GUI/images/new_launcher_bg_0-1.png"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/test_width=1024
|
||||
window/size/test_height=600
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "input_map_button" )
|
||||
|
||||
[input]
|
||||
|
||||
ui_select=[ ]
|
||||
ui_focus_next=[ ]
|
||||
ui_quit=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_pause=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_reload=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_free_cursor=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
jump=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_test=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
game_flashlight=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":76,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_debug_window=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
ui_music_controls=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777245,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
|
||||
[locale]
|
||||
|
||||
fallback="fr"
|
||||
|
||||
[logging]
|
||||
|
||||
file_logging/enable_file_logging=true
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/filters/use_nearest_mipmap_filter=true
|
||||
quality/shadows/filter_mode=2
|
||||
quality/filters/msaa=3
|
||||
environment/default_environment="res://default_env.tres"
|
91
scenes/GUI/GUI.gd
Normal file
|
@ -0,0 +1,91 @@
|
|||
extends MarginContainer
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
$Home.show()
|
||||
$Settings.hide()
|
||||
|
||||
#func _process(delta):
|
||||
# # Called every frame. Delta is time since last frame.
|
||||
# # Update game logic here.
|
||||
# pass
|
||||
|
||||
|
||||
func _on_Home_setting_pressed():
|
||||
$Home.hide()
|
||||
$Settings.show()
|
||||
$Help.hide()
|
||||
|
||||
|
||||
func _on_Settings_return_pressed():
|
||||
$Home.show()
|
||||
$Settings.hide()
|
||||
$Help.show()
|
||||
|
||||
func _on_Home_play_pressed():
|
||||
if not get_tree().paused:
|
||||
pause()
|
||||
# $Home/MarginContainer/Menu/Buttons/VBoxContainer/PlayButton.text = "Play"
|
||||
else:
|
||||
play()
|
||||
# $Home/MarginContainer/Menu/Buttons/VBoxContainer/PlayButton.text = "Pause"
|
||||
|
||||
# get_tree().paused = !get_tree().paused
|
||||
# if get_tree().paused:-
|
||||
# $Home/MarginContainer/Menu/Buttons/VBoxContainer/PlayButton.text = "Play"
|
||||
# else:
|
||||
# $Home/MarginContainer/Menu/Buttons/VBoxContainer/PlayButton.text = "Pause"
|
||||
|
||||
func _input(event):
|
||||
|
||||
if event.is_action_pressed("ui_test"):
|
||||
print( "Event: ui_test" )
|
||||
|
||||
if event.is_action_pressed("ui_quit"):
|
||||
get_tree().quit()
|
||||
|
||||
if event.is_action_pressed("ui_reload"):
|
||||
if not $Settings.visible:
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
if event.is_action_pressed("ui_pause") and not event.is_echo():
|
||||
if not $Settings.visible:
|
||||
if not get_tree().paused:
|
||||
pause()
|
||||
else:
|
||||
play()
|
||||
# ----------------------------------
|
||||
# Capturing/Freeing the cursor
|
||||
if Input.is_action_just_pressed("ui_free_cursor"):
|
||||
if Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
else:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
# ----------------------------------
|
||||
|
||||
|
||||
func pause():
|
||||
get_tree().paused = true
|
||||
show_menu()
|
||||
func play():
|
||||
get_tree().paused = false
|
||||
hide_menu()
|
||||
|
||||
|
||||
func show_menu():
|
||||
$Home.show()
|
||||
$Settings.hide()
|
||||
$HUD.modulate.a = 0.5
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
func hide_menu():
|
||||
$Settings.hide()
|
||||
$Home.hide()
|
||||
$HUD.show()
|
||||
$Help.show()
|
||||
$HUD.modulate.a = 1.0
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
72
scenes/GUI/GUI.tscn
Normal file
|
@ -0,0 +1,72 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/GUI/GUI.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/GUI/HUD/HUD.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scenes/GUI/Home/Home.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://scenes/GUI/Settings/Settings.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://scenes/GUI/Help/Help.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="GUI" type="MarginContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
custom_constants/margin_right = 4
|
||||
custom_constants/margin_top = 4
|
||||
custom_constants/margin_left = 4
|
||||
custom_constants/margin_bottom = 4
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Margin", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="HUD" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 596.0
|
||||
|
||||
[node name="Home" parent="." index="1" instance=ExtResource( 3 )]
|
||||
|
||||
visible = false
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 596.0
|
||||
_sections_unfolded = [ "Margin", "Size Flags", "Visibility", "custom_constants" ]
|
||||
|
||||
[node name="Settings" parent="." index="2" instance=ExtResource( 4 )]
|
||||
|
||||
visible = false
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 596.0
|
||||
_sections_unfolded = [ "Margin", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="Help" parent="." index="3" instance=ExtResource( 5 )]
|
||||
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 86.0
|
||||
|
||||
[connection signal="play_pressed" from="Home" to="." method="_on_Home_play_pressed"]
|
||||
|
||||
[connection signal="setting_pressed" from="Home" to="." method="_on_Home_setting_pressed"]
|
||||
|
||||
[connection signal="return_pressed" from="Settings" to="." method="_on_Settings_return_pressed"]
|
||||
|
||||
|
30
scenes/GUI/HUD/HUD.gd
Normal file
|
@ -0,0 +1,30 @@
|
|||
extends MarginContainer
|
||||
|
||||
var HUD_config_file = "user://hud.cfg"
|
||||
|
||||
|
||||
func _ready():
|
||||
var config_file = ConfigFile.new()
|
||||
var err = config_file.load( HUD_config_file )
|
||||
if err:
|
||||
print("Error code when loading config file: ", err)
|
||||
else:
|
||||
for child in get_node("Windows" ).get_children():
|
||||
child.load_from_file( config_file )
|
||||
|
||||
func _input( event ):
|
||||
if event.is_action_pressed( "ui_music_controls" ):
|
||||
$Windows/Music.visible = not $Windows/Music.visible
|
||||
|
||||
|
||||
func _on_SaveHUD_pressed():
|
||||
|
||||
var config_file = ConfigFile.new()
|
||||
var err = config_file.load( HUD_config_file )
|
||||
if err:
|
||||
print("Error code when loading config file: ", err)
|
||||
|
||||
for child in get_node("Windows" ).get_children():
|
||||
child.save_to_file( config_file )
|
||||
|
||||
config_file.save( HUD_config_file )
|
1331
scenes/GUI/HUD/HUD.tscn
Normal file
133
scenes/GUI/HUD/WindowControl.gd
Normal file
|
@ -0,0 +1,133 @@
|
|||
extends MarginContainer
|
||||
|
||||
export(bool) var is_movable = true
|
||||
export(bool) var is_resizable = true
|
||||
export(bool) var is_borderless = false
|
||||
|
||||
|
||||
var current_rect_size = Vector2( 0, 0 )
|
||||
var current_rect_position = Vector2( 0, 0 )
|
||||
var is_resizing = false
|
||||
var is_moving = false
|
||||
|
||||
func _ready():
|
||||
current_rect_size = self.rect_min_size
|
||||
|
||||
if is_borderless:
|
||||
$Background.region_rect = Rect2( 3, 28+3, 512-6, 512-28-6 )
|
||||
$VBoxContainer/Header/HBoxContainer/Close.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Open.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Quit.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Label.visible = false
|
||||
# else:
|
||||
# $Background.region_rect = Rect2( 0, 0, 512, 512 )
|
||||
# $VBoxContainer/Header/HBoxContainer/Close.visible = true
|
||||
# $VBoxContainer/Header/HBoxContainer/Open.visible = false
|
||||
# $VBoxContainer/Header/HBoxContainer/Quit.visible = true
|
||||
# $VBoxContainer/Header/HBoxContainer/Label.visible = true
|
||||
if not is_resizable:
|
||||
$VBoxContainer/Footer/HBoxContainer/Resize.visible = false
|
||||
|
||||
|
||||
func _on_Window_mouse_entered():
|
||||
print("mouse_entered")
|
||||
|
||||
|
||||
func _on_Window_focus_entered():
|
||||
print("focus_entered")
|
||||
|
||||
|
||||
func _on_Quit_pressed():
|
||||
self.visible = false
|
||||
|
||||
func get_content():
|
||||
return $VBoxContainer/Content
|
||||
|
||||
|
||||
|
||||
func close():
|
||||
if not is_borderless:
|
||||
$VBoxContainer/Header/HBoxContainer/Close.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Open.visible = true
|
||||
$VBoxContainer/Content.visible = false
|
||||
$VBoxContainer/Footer.visible = false
|
||||
current_rect_size = self.rect_size
|
||||
self.rect_size = Vector2( 0, 0 )
|
||||
else:
|
||||
$VBoxContainer/Header/HBoxContainer/Close.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Open.visible = false
|
||||
$VBoxContainer/Content.visible = false
|
||||
$VBoxContainer/Footer.visible = false
|
||||
current_rect_size = self.rect_size
|
||||
self.rect_size = Vector2( 0, 0 )
|
||||
|
||||
|
||||
func _on_Close_pressed():
|
||||
close()
|
||||
|
||||
func open():
|
||||
if not is_borderless:
|
||||
$VBoxContainer/Header/HBoxContainer/Close.visible = true
|
||||
$VBoxContainer/Header/HBoxContainer/Open.visible = false
|
||||
$VBoxContainer/Content.visible = true
|
||||
$VBoxContainer/Footer.visible = true
|
||||
self.rect_size = current_rect_size
|
||||
else:
|
||||
$VBoxContainer/Header/HBoxContainer/Close.visible = false
|
||||
$VBoxContainer/Header/HBoxContainer/Open.visible = false
|
||||
$VBoxContainer/Content.visible = true
|
||||
$VBoxContainer/Footer.visible = true
|
||||
self.rect_size = current_rect_size
|
||||
|
||||
func _on_Open_pressed():
|
||||
open()
|
||||
|
||||
func _on_Resize_pressed():
|
||||
is_resizing = true
|
||||
|
||||
func _input( event ):
|
||||
if is_resizable:
|
||||
if is_resizing and event is InputEventMouseButton and not event.pressed:
|
||||
is_resizing = false
|
||||
if event is InputEventMouseMotion and is_resizing:
|
||||
var delta = event.relative
|
||||
self.rect_size += delta
|
||||
|
||||
func _on_Header_gui_input(ev):
|
||||
if is_movable:
|
||||
if is_moving and ev is InputEventMouseButton and not ev.pressed:
|
||||
is_moving = false
|
||||
elif not is_moving and ev is InputEventMouseButton and ev.pressed:
|
||||
is_moving = true
|
||||
if ev is InputEventMouseMotion and is_moving:
|
||||
var delta = ev.relative
|
||||
self.rect_position += delta
|
||||
|
||||
func load_from_file( config_file ):
|
||||
if config_file.has_section( self.name ):
|
||||
self.rect_position = config_file.get_value( self.name, "position" )
|
||||
self.rect_size = config_file.get_value( self.name, "size" )
|
||||
self.is_borderless = config_file.get_value( self.name, "borderless" )
|
||||
current_rect_position = self.rect_position
|
||||
current_rect_size = self.rect_size
|
||||
if config_file.get_value( self.name, "opened" ):
|
||||
open()
|
||||
else:
|
||||
close()
|
||||
|
||||
|
||||
func save_to_file( config_file ):
|
||||
print( "saving "+ self.name +" in file"+ str(config_file) )
|
||||
print( "... position: "+ str(self.rect_position) )
|
||||
print( "... size: "+ str(self.rect_size) )
|
||||
print( "......" )
|
||||
print( "" )
|
||||
|
||||
config_file.set_value(self.name, "position", self.rect_position)
|
||||
config_file.set_value(self.name, "size", self.rect_size)
|
||||
if $VBoxContainer/Content.visible:
|
||||
config_file.set_value(self.name, "opened", true)
|
||||
else:
|
||||
config_file.set_value(self.name, "opened", false)
|
||||
config_file.set_value(self.name, "borderless", is_borderless)
|
||||
|
14
scenes/GUI/Help/FPS.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Label
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
const TIMER_DELTA = 1
|
||||
onready var timer = TIMER_DELTA
|
||||
|
||||
func _process(delta):
|
||||
if timer >= TIMER_DELTA:
|
||||
self.set_text("FPS: " + str(int( 60/delta )) )
|
||||
timer = 0
|
||||
else:
|
||||
timer += delta
|
35
scenes/GUI/Help/Help.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends MarginContainer
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
const ACTION_LIST = [ "ui_debug_window", "ui_music_controls", "move_up", "move_down", "move_left", "move_right", "game_flashlight", "ui_pause", "ui_reload", "ui_free_cursor", "ui_quit" ]
|
||||
const ACTION_TEXT = [ "show/hide debug", "show/hide music", "move up", "move down", "move left", "move right", "on/off flashlight", "pause/play", "reload the scene", "free/capture mouse cursor", "quit" ]
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
var index = 0
|
||||
for action_name in ACTION_LIST:
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventKey:
|
||||
var label = Label.new()
|
||||
label.name = action_name
|
||||
label.text = ACTION_TEXT[ index ] + ": " + OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||
$MarginContainer/VBoxContainer.add_child( label )
|
||||
label.set_owner( $MarginContainer/VBoxContainer )
|
||||
index += 1
|
||||
|
||||
|
||||
|
||||
func _on_Refresh_pressed():
|
||||
for action_name in ACTION_LIST:
|
||||
for event in InputMap.get_action_list( action_name ):
|
||||
if event is InputEventKey:
|
||||
get_node( "MarginContainer/VBoxContainer" ).get_node( action_name ).text = action_name + ": " + OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||
|
||||
|
||||
func _input( event ):
|
||||
if event.is_action_pressed( "ui_debug_window" ):
|
||||
self.visible = not self.visible
|
182
scenes/GUI/Help/Help.tscn
Normal file
|
@ -0,0 +1,182 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/GUI/Help/Help.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/GUI/Help/FPS.gd" type="Script" id=2]
|
||||
|
||||
|
||||
|
||||
[sub_resource type="Gradient" id=1]
|
||||
|
||||
offsets = PoolRealArray( 0, 1 )
|
||||
colors = PoolColorArray( 0, 0, 0, 0.784314, 0, 0, 0, 0.784314 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 1 )
|
||||
width = 2048
|
||||
|
||||
[node name="Help" type="MarginContainer"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 2
|
||||
custom_constants/margin_right = 0
|
||||
custom_constants/margin_top = 0
|
||||
custom_constants/margin_left = 0
|
||||
custom_constants/margin_bottom = 0
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Margin", "Size Flags", "custom_constants" ]
|
||||
|
||||
[node name="Background" type="NinePatchRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 135.0
|
||||
margin_bottom = 82.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
texture = SubResource( 2 )
|
||||
_sections_unfolded = [ "Anchor", "Margin", "Size Flags", "Theme" ]
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 135.0
|
||||
margin_bottom = 82.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
custom_constants/margin_right = 4
|
||||
custom_constants/margin_top = 4
|
||||
custom_constants/margin_left = 4
|
||||
custom_constants/margin_bottom = 4
|
||||
_sections_unfolded = [ "Anchor", "Margin", "custom_constants" ]
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 131.0
|
||||
margin_bottom = 78.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 127.0
|
||||
margin_bottom = 14.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Debug:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="FPS" type="Label" parent="MarginContainer/VBoxContainer" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 18.0
|
||||
margin_right = 127.0
|
||||
margin_bottom = 32.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "FPS:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="DefaultKey" type="Label" parent="MarginContainer/VBoxContainer" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 36.0
|
||||
margin_right = 127.0
|
||||
margin_bottom = 50.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Default key binding:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="Refresh" type="Button" parent="MarginContainer/VBoxContainer" index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 54.0
|
||||
margin_right = 127.0
|
||||
margin_bottom = 74.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "refresh"
|
||||
flat = false
|
||||
align = 1
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Refresh" to="." method="_on_Refresh_pressed"]
|
||||
|
||||
|
26
scenes/GUI/Home/Home.gd
Normal file
|
@ -0,0 +1,26 @@
|
|||
extends MarginContainer
|
||||
|
||||
signal play_pressed
|
||||
signal setting_pressed
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
pass
|
||||
|
||||
#func _process(delta):
|
||||
# # Called every frame. Delta is time since last frame.
|
||||
# # Update game logic here.
|
||||
# pass
|
||||
|
||||
|
||||
func _on_PlayButton_pressed():
|
||||
emit_signal("play_pressed" )
|
||||
|
||||
func _on_SettingsButton_pressed():
|
||||
emit_signal("setting_pressed" )
|
||||
|
||||
func _on_QuitButton_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
|
299
scenes/GUI/Home/Home.tscn
Normal file
|
@ -0,0 +1,299 @@
|
|||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/GUI/Home/Home.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/GUI/fonts/ryzom.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
|
||||
size = 18
|
||||
use_mipmaps = false
|
||||
use_filter = false
|
||||
extra_spacing_top = 8
|
||||
extra_spacing_bottom = 8
|
||||
font_data = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Extra Spacing", "Font", "Resource", "Settings" ]
|
||||
|
||||
[sub_resource type="Theme" id=2]
|
||||
|
||||
default_font = SubResource( 1 )
|
||||
_sections_unfolded = [ "Resource" ]
|
||||
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
|
||||
size = 64
|
||||
use_mipmaps = false
|
||||
use_filter = false
|
||||
font_data = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Font", "Resource", "Settings" ]
|
||||
|
||||
[sub_resource type="Gradient" id=4]
|
||||
|
||||
offsets = PoolRealArray( 0, 1 )
|
||||
colors = PoolColorArray( 0, 0, 0, 0.784314, 0, 0, 0, 0.784314 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=5]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 4 )
|
||||
width = 2048
|
||||
|
||||
[sub_resource type="DynamicFont" id=6]
|
||||
|
||||
size = 18
|
||||
use_mipmaps = false
|
||||
use_filter = false
|
||||
font_data = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[node name="Home" type="MarginContainer"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/margin_right = 0
|
||||
custom_constants/margin_top = 0
|
||||
custom_constants/margin_left = 0
|
||||
custom_constants/margin_bottom = 0
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Size Flags", "Visibility", "custom_constants" ]
|
||||
|
||||
[node name="Menu" type="VBoxContainer" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
theme = SubResource( 2 )
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Grow Direction", "Rect", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="Title" type="Label" parent="Menu" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 146.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_offset_x = 4
|
||||
custom_constants/shadow_offset_y = 4
|
||||
text = "KHANAT"
|
||||
align = 1
|
||||
valign = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags", "Theme", "custom_colors", "custom_constants", "custom_fonts", "custom_styles" ]
|
||||
|
||||
[node name="Buttons" type="MarginContainer" parent="Menu" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 470.0
|
||||
margin_top = 150.0
|
||||
margin_right = 554.0
|
||||
margin_bottom = 450.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 1
|
||||
custom_constants/margin_right = 0
|
||||
custom_constants/margin_top = 42
|
||||
custom_constants/margin_left = 0
|
||||
custom_constants/margin_bottom = 42
|
||||
_sections_unfolded = [ "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Menu/Buttons" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 42.0
|
||||
margin_right = 84.0
|
||||
margin_bottom = 258.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
custom_constants/separation = 42
|
||||
alignment = 1
|
||||
_sections_unfolded = [ "Margin", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="PlayButton" type="Button" parent="Menu/Buttons/VBoxContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 84.0
|
||||
margin_bottom = 44.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
hint_tooltip = "Test tooltip."
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Play"
|
||||
flat = false
|
||||
align = 1
|
||||
_sections_unfolded = [ "Hint", "Theme", "custom_fonts" ]
|
||||
|
||||
[node name="SettingsButton" type="Button" parent="Menu/Buttons/VBoxContainer" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 86.0
|
||||
margin_right = 84.0
|
||||
margin_bottom = 130.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Settings"
|
||||
flat = false
|
||||
align = 1
|
||||
_sections_unfolded = [ "Anchor", "Rect", "custom_fonts" ]
|
||||
|
||||
[node name="QuitButton" type="Button" parent="Menu/Buttons/VBoxContainer" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 172.0
|
||||
margin_right = 84.0
|
||||
margin_bottom = 216.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Quit"
|
||||
flat = false
|
||||
align = 1
|
||||
|
||||
[node name="Container" type="MarginContainer" parent="Menu" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 558.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_min_size = Vector2( 0, 42 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 10
|
||||
custom_constants/margin_right = 0
|
||||
custom_constants/margin_top = 0
|
||||
custom_constants/margin_left = 0
|
||||
custom_constants/margin_bottom = 0
|
||||
_sections_unfolded = [ "Rect", "Size Flags", "custom_constants" ]
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="Menu/Container" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 42.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 11
|
||||
texture = SubResource( 5 )
|
||||
_sections_unfolded = [ "Size Flags", "Visibility" ]
|
||||
|
||||
[node name="Footer" type="Label" parent="Menu/Container" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 429.0
|
||||
margin_top = 10.0
|
||||
margin_right = 594.0
|
||||
margin_bottom = 32.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
custom_fonts/font = SubResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0.617188, 0.617188, 0.617188, 1 )
|
||||
text = "Powered by Godot"
|
||||
align = 1
|
||||
valign = 2
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags", "custom_colors", "custom_constants", "custom_fonts" ]
|
||||
|
||||
[connection signal="pressed" from="Menu/Buttons/VBoxContainer/PlayButton" to="." method="_on_PlayButton_pressed"]
|
||||
|
||||
[connection signal="pressed" from="Menu/Buttons/VBoxContainer/SettingsButton" to="." method="_on_SettingsButton_pressed"]
|
||||
|
||||
[connection signal="pressed" from="Menu/Buttons/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"]
|
||||
|
||||
|
63
scenes/GUI/MusicControls/Music.gd
Normal file
|
@ -0,0 +1,63 @@
|
|||
extends VBoxContainer
|
||||
|
||||
#var songs_list = [ "Sangakanat", "pre-mix_khanat_main_theme" ]
|
||||
var songs_list = []
|
||||
var current_song = ""
|
||||
var current_position = 0.0
|
||||
var popup
|
||||
|
||||
func _ready():
|
||||
for song in $Songs.get_children():
|
||||
songs_list.append( song.name )
|
||||
if $Songs.get_child_count() > 0:
|
||||
current_song = songs_list[0]
|
||||
|
||||
|
||||
popup = $SongsSelector.get_popup()
|
||||
for song in songs_list:
|
||||
popup.add_item( song )
|
||||
get_node( "Songs" ).get_node( song ).connect( "finished", self, "_on_song_finished" )
|
||||
$SongsSelector.text = current_song
|
||||
|
||||
func set_play():
|
||||
if get_node( "Songs" ).get_node( current_song ):
|
||||
get_node( "Songs" ).get_node( current_song ).play( current_position )
|
||||
$Buttons/Pause.text = "Pause"
|
||||
$Title.text = "Musiques (Played):"
|
||||
|
||||
func set_pause():
|
||||
if get_node( "Songs" ).get_node( current_song ):
|
||||
current_position = get_node( "Songs" ).get_node( current_song ).get_playback_position()
|
||||
get_node( "Songs" ).get_node( current_song ).stop()
|
||||
else:
|
||||
current_position = 0.0
|
||||
|
||||
$Buttons/Pause.text = "Play"
|
||||
$Title.text = "Musiques (Paused):"
|
||||
|
||||
func set_stop():
|
||||
if get_node( "Songs" ).get_node( current_song ):
|
||||
get_node( "Songs" ).get_node( current_song ).stop()
|
||||
current_position = 0.0
|
||||
$Buttons/Pause.pressed = false
|
||||
$Buttons/Pause.text = "Play"
|
||||
$Title.text = "Musiques (Stopped):"
|
||||
|
||||
func _on_Pause_toggled(button_pressed):
|
||||
if button_pressed:
|
||||
set_play()
|
||||
else:
|
||||
set_pause()
|
||||
|
||||
func _on_Stop_pressed():
|
||||
set_stop()
|
||||
|
||||
func _on_SongsSelector_item_selected(ID):
|
||||
var new_song = popup.get_item_text(ID)
|
||||
if not current_song == new_song:
|
||||
set_stop()
|
||||
current_song = popup.get_item_text(ID)
|
||||
|
||||
func _on_song_finished():
|
||||
print("test")
|
||||
set_stop()
|
186
scenes/GUI/MusicControls/MusicControls.tscn
Normal file
|
@ -0,0 +1,186 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/GUI/MusicControls/Music.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/test/musiques/pre-mix_khanat_main_theme_2018-07-23.ogg" type="AudioStream" id=2]
|
||||
[ext_resource path="res://assets/test/musiques/Sangakanat (short instrumental theme).ogg" type="AudioStream" id=3]
|
||||
|
||||
|
||||
[node name="Music" type="VBoxContainer"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 316.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 402.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Songs" type="Container" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 256.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
|
||||
[node name="pre-mix_khanat_main_theme" type="AudioStreamPlayer" parent="Songs" index="0"]
|
||||
|
||||
pause_mode = 1
|
||||
stream = ExtResource( 2 )
|
||||
volume_db = 0.0
|
||||
autoplay = false
|
||||
mix_target = 0
|
||||
bus = "Master"
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="Sangakanat" type="AudioStreamPlayer" parent="Songs" index="1"]
|
||||
|
||||
pause_mode = 1
|
||||
stream = ExtResource( 3 )
|
||||
volume_db = 0.0
|
||||
autoplay = false
|
||||
mix_target = 0
|
||||
bus = "Master"
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="Title" type="Label" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 4.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 18.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Musique:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="SongsSelector" type="OptionButton" parent="." index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 22.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 42.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
action_mode = 0
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = false
|
||||
align = 0
|
||||
items = [ ]
|
||||
selected = -1
|
||||
|
||||
[node name="Buttons" type="HBoxContainer" parent="." index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 46.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 66.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
|
||||
[node name="Pause" type="Button" parent="Buttons" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 20.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
custom_colors/font_color_disabled = Color( 0.496055, 0.413039, 0.660156, 1 )
|
||||
custom_colors/font_color = Color( 0.494118, 0.411765, 0.658824, 1 )
|
||||
custom_colors/font_color_hover = Color( 0.863051, 0.203209, 1, 1 )
|
||||
custom_colors/font_color_pressed = Color( 0.673295, 0.508021, 1, 1 )
|
||||
toggle_mode = true
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Play"
|
||||
flat = false
|
||||
align = 1
|
||||
_sections_unfolded = [ "Size Flags", "custom_colors", "custom_constants", "custom_fonts", "custom_styles" ]
|
||||
|
||||
[node name="Stop" type="Button" parent="Buttons" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 130.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 20.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
custom_colors/font_color_disabled = Color( 0.496055, 0.413039, 0.660156, 1 )
|
||||
custom_colors/font_color = Color( 0.494118, 0.411765, 0.658824, 1 )
|
||||
custom_colors/font_color_hover = Color( 0.863051, 0.203209, 1, 1 )
|
||||
custom_colors/font_color_pressed = Color( 0.673295, 0.508021, 1, 1 )
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Stop"
|
||||
flat = false
|
||||
align = 1
|
||||
_sections_unfolded = [ "Size Flags", "custom_colors", "custom_constants", "custom_fonts", "custom_styles" ]
|
||||
|
||||
[connection signal="item_selected" from="SongsSelector" to="." method="_on_SongsSelector_item_selected"]
|
||||
|
||||
[connection signal="toggled" from="Buttons/Pause" to="." method="_on_Pause_toggled"]
|
||||
|
||||
[connection signal="pressed" from="Buttons/Stop" to="." method="_on_Stop_pressed"]
|
||||
|
||||
|
13
scenes/GUI/Settings/MenuButton.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends MenuButton
|
||||
|
||||
var popup
|
||||
|
||||
func _ready():
|
||||
popup = get_popup()
|
||||
popup.add_item("item a")
|
||||
popup.add_item("item b")
|
||||
popup.add_item("item c")
|
||||
# popup.connect("item_pressed", self, "_on_item_pressed")
|
||||
|
||||
func _on_item_pressed(ID):
|
||||
self.text = popup.get_item_text(ID)
|
54
scenes/GUI/Settings/Settings.gd
Normal file
|
@ -0,0 +1,54 @@
|
|||
extends Container
|
||||
|
||||
signal return_pressed
|
||||
|
||||
|
||||
func _ready():
|
||||
$Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Fullscreen/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/fullscreen" )
|
||||
$Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Borderless/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/borderless" )
|
||||
$Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Resizable/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/resizable" )
|
||||
$Menus/TabContainer/Display/ScrollContainer/VBoxContainer/CurrentScreen/SpinBox.value = OS.current_screen
|
||||
|
||||
#func _process(delta):
|
||||
# # Called every frame. Delta is time since last frame.
|
||||
# # Update game logic here.
|
||||
# pass
|
||||
|
||||
func _on_ReturnButton_pressed():
|
||||
emit_signal( "return_pressed" )
|
||||
|
||||
|
||||
func _on_Title_text_changed(new_text):
|
||||
# ----------------------------------
|
||||
# Changing windows title
|
||||
var new_title = "Khanat"
|
||||
new_text = new_text.strip_edges()
|
||||
if not new_text == "":
|
||||
new_title = new_text
|
||||
new_title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
|
||||
OS.set_window_title( new_title )
|
||||
# ----------------------------------
|
||||
|
||||
func _on_Fullscreen_toggled(button_pressed):
|
||||
if ProjectSettings.has_setting( "display/window/size/fullscreen" ):
|
||||
ProjectSettings.set_setting("display/window/size/fullscreen", button_pressed)
|
||||
OS.window_fullscreen = ProjectSettings.get_setting("display/window/size/fullscreen")
|
||||
|
||||
func _on_Borderless_toggled(button_pressed):
|
||||
if ProjectSettings.has_setting( "display/window/size/borderless" ):
|
||||
ProjectSettings.set_setting("display/window/size/borderless", button_pressed)
|
||||
OS.window_borderless = ProjectSettings.get_setting("display/window/size/borderless")
|
||||
|
||||
func _on_Resizable_toggled(button_pressed):
|
||||
if ProjectSettings.has_setting( "display/window/size/resizable" ):
|
||||
ProjectSettings.set_setting("display/window/size/resizable", button_pressed)
|
||||
OS.window_resizable = ProjectSettings.get_setting("display/window/size/resizable")
|
||||
|
||||
# La fonction existe dans la doc mais le moteur lui ne la reconnait pas,
|
||||
# soit il y a une subtilité quelquepart soit la doc n'est pas à jour.
|
||||
func _on_AlwaysOnTop_toggled(button_pressed):
|
||||
# OS.set_window_always_on_top( button_pressed )
|
||||
pass
|
||||
|
||||
func _on_SpinBox_value_changed(value):
|
||||
OS.current_screen = value
|
1536
scenes/GUI/Settings/Settings.tscn
Normal file
106
scenes/Game/Character.gd
Normal file
|
@ -0,0 +1,106 @@
|
|||
extends KinematicBody
|
||||
|
||||
var dir = Vector3()
|
||||
const GRAVITY = -24.8
|
||||
var vel = Vector3()
|
||||
const MAX_SPEED = 20
|
||||
const ACCEL= 4.5
|
||||
|
||||
const DEACCEL= 16
|
||||
const MAX_SLOPE_ANGLE = 40
|
||||
|
||||
var camera_rotation
|
||||
var camera
|
||||
|
||||
var MOUSE_SENSITIVITY = 0.05
|
||||
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
func _ready():
|
||||
camera_rotation = $Camera_rotation_helper
|
||||
camera = $Camera_rotation_helper/Camera
|
||||
|
||||
func _process(delta):
|
||||
process_input(delta)
|
||||
process_movement(delta)
|
||||
|
||||
|
||||
func process_input(delta):
|
||||
# ----------------------------------
|
||||
# Walking
|
||||
dir = Vector3()
|
||||
var cam_xform = camera.get_global_transform()
|
||||
|
||||
var input_movement_vector = Vector2()
|
||||
var cam_scroll = 0.0
|
||||
|
||||
if Input.is_action_pressed("move_up"):
|
||||
input_movement_vector.y += 1
|
||||
if Input.is_action_pressed("move_down"):
|
||||
input_movement_vector.y -= 1
|
||||
if Input.is_action_pressed("move_left"):
|
||||
input_movement_vector.x -= 1
|
||||
if Input.is_action_pressed("move_right"):
|
||||
input_movement_vector.x = 1
|
||||
|
||||
input_movement_vector = input_movement_vector.normalized()
|
||||
|
||||
dir += -cam_xform.basis.z.normalized() * input_movement_vector.y
|
||||
dir += cam_xform.basis.x.normalized() * input_movement_vector.x
|
||||
|
||||
|
||||
|
||||
func process_movement(delta):
|
||||
dir.y = 0
|
||||
dir = dir.normalized()
|
||||
|
||||
vel.y += delta*GRAVITY
|
||||
|
||||
var hvel = vel
|
||||
hvel.y = 0
|
||||
|
||||
var target = dir
|
||||
target *= MAX_SPEED
|
||||
|
||||
var accel
|
||||
if dir.dot(hvel) > 0:
|
||||
accel = ACCEL
|
||||
else:
|
||||
accel = DEACCEL
|
||||
|
||||
hvel = hvel.linear_interpolate(target, accel*delta)
|
||||
vel.x = hvel.x
|
||||
vel.z = hvel.z
|
||||
vel = move_and_slide(vel,Vector3(0,1,0), 0.05, 4, deg2rad(MAX_SLOPE_ANGLE))
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
|
||||
camera_rotation.rotate_x(deg2rad(event.relative.y * MOUSE_SENSITIVITY * -1))
|
||||
self.rotate_y(deg2rad(event.relative.x * MOUSE_SENSITIVITY * -1))
|
||||
|
||||
var camera_rot = camera_rotation.rotation_degrees
|
||||
camera_rot.x = clamp(camera_rot.x, -30, 30)
|
||||
camera_rotation.rotation_degrees = camera_rot
|
||||
|
||||
|
||||
if event is InputEventMouseButton and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
|
||||
|
||||
# to prevent the cam sliding effect when clamp limit reached.
|
||||
var old_x_translation = camera.translation.x
|
||||
|
||||
var cam_scroll = Vector3( 0.0, 0.0, 0.0 )
|
||||
if event.button_index == BUTTON_WHEEL_UP:
|
||||
cam_scroll.z = -1.0 * MOUSE_SENSITIVITY
|
||||
if event.button_index == BUTTON_WHEEL_DOWN:
|
||||
cam_scroll.z = 1.0 * MOUSE_SENSITIVITY
|
||||
|
||||
camera.translate( cam_scroll )
|
||||
|
||||
camera.translation.x = old_x_translation
|
||||
camera.translation.z = clamp(camera.translation.z, -5, 0)
|
||||
|
||||
if event.is_action_pressed( "game_flashlight" ) and not event.is_echo():
|
||||
camera.get_node( "Flashlight" ).visible = not camera.get_node( "Flashlight" ).visible
|
83
scenes/Game/CubeShaderTest.tscn
Normal file
|
@ -0,0 +1,83 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
size = Vector3( 2, 2, 2 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[sub_resource type="Shader" id=2]
|
||||
|
||||
code = "shader_type spatial;
|
||||
|
||||
varying vec3 some_color;
|
||||
void vertex() {
|
||||
some_color = NORMAL; // make the normal the color
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = some_color;
|
||||
}"
|
||||
_sections_unfolded = [ "Resource" ]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=3]
|
||||
|
||||
render_priority = 0
|
||||
shader = SubResource( 2 )
|
||||
_sections_unfolded = [ "Resource" ]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape" id=4]
|
||||
|
||||
points = PoolVector3Array( -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1 )
|
||||
|
||||
[node name="CubeShaderTest" type="RigidBody"]
|
||||
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 1.0
|
||||
custom_integrator = false
|
||||
continuous_cd = false
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
axis_lock_linear_x = false
|
||||
axis_lock_linear_y = false
|
||||
axis_lock_linear_z = false
|
||||
axis_lock_angular_x = false
|
||||
axis_lock_angular_y = false
|
||||
axis_lock_angular_z = false
|
||||
linear_velocity = Vector3( 0, 0, 0 )
|
||||
linear_damp = -1.0
|
||||
angular_velocity = Vector3( 0, 0, 0 )
|
||||
angular_damp = -1.0
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="." index="0"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="." index="1"]
|
||||
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
|
||||
|
645
scenes/Game/Game.tscn
Normal file
|
@ -0,0 +1,645 @@
|
|||
[gd_scene load_steps=23 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Game/Character.gd" type="Script" id=1]
|
||||
[ext_resource path="res://default_env.tres" type="Environment" id=2]
|
||||
[ext_resource path="res://assets/Game/Brick08/Bricks08_col.jpg" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/Game/Brick08/Bricks08_AO.jpg" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/Game/Brick08/Bricks08_disp.jpg" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/Game/Brick08/Bricks08_nrm.jpg" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/Game/Brick08/Bricks08_rgh.jpg" type="Texture" id=7]
|
||||
[ext_resource path="res://scenes/Game/CubeShaderTest.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://scenes/Game/firecamp.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://assets/Game/textures/fire_01.png" type="Texture" id=10]
|
||||
[ext_resource path="res://assets/Game/textures/fire_02.png" type="Texture" id=11]
|
||||
|
||||
[sub_resource type="CapsuleShape" id=1]
|
||||
|
||||
radius = 0.938666
|
||||
height = 3.34992
|
||||
|
||||
[sub_resource type="PlaneMesh" id=2]
|
||||
|
||||
size = Vector2( 2, 2 )
|
||||
subdivide_width = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=3]
|
||||
|
||||
render_priority = 1
|
||||
flags_transparent = false
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 0
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 1, 1, 1, 1 )
|
||||
albedo_texture = ExtResource( 3 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 1.0
|
||||
roughness_texture = ExtResource( 7 )
|
||||
roughness_texture_channel = 3
|
||||
emission_enabled = false
|
||||
normal_enabled = true
|
||||
normal_scale = 1.0
|
||||
normal_texture = ExtResource( 6 )
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = true
|
||||
ao_light_affect = 0.0
|
||||
ao_texture = ExtResource( 4 )
|
||||
ao_on_uv2 = false
|
||||
ao_texture_channel = 0
|
||||
depth_enabled = true
|
||||
depth_scale = 0.05
|
||||
depth_deep_parallax = true
|
||||
depth_min_layers = 8
|
||||
depth_max_layers = 32
|
||||
depth_texture = ExtResource( 5 )
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 2, 2, 2 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Ambient Occlusion", "Anisotropy", "Clearcoat", "Depth", "Detail", "Distance Fade", "Emission", "Flags", "Metallic", "NormalMap", "Parameters", "Proximity Fade", "Refraction", "Roughness", "Subsurf Scatter", "Transmission", "UV1", "UV2", "Vertex Color" ]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape" id=4]
|
||||
|
||||
points = PoolVector3Array( 1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, -1 )
|
||||
|
||||
[sub_resource type="CubeMesh" id=5]
|
||||
|
||||
size = Vector3( 2, 2, 2 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=6]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = false
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = true
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 0
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 1, 1, 1, 1 )
|
||||
albedo_texture = ExtResource( 3 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture = ExtResource( 7 )
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = true
|
||||
normal_scale = 1.0
|
||||
normal_texture = ExtResource( 6 )
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = true
|
||||
ao_light_affect = 0.0
|
||||
ao_texture = ExtResource( 4 )
|
||||
ao_on_uv2 = false
|
||||
ao_texture_channel = 0
|
||||
depth_enabled = true
|
||||
depth_scale = 0.05
|
||||
depth_deep_parallax = true
|
||||
depth_min_layers = 8
|
||||
depth_max_layers = 32
|
||||
depth_texture = ExtResource( 5 )
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Ambient Occlusion", "Clearcoat", "Depth", "Detail", "Distance Fade", "Flags", "NormalMap", "Proximity Fade", "Rim", "Roughness", "Subsurf Scatter", "Transmission", "Vertex Color" ]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape" id=7]
|
||||
|
||||
points = PoolVector3Array( -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=8]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = false
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 2
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.390625, 0.390625, 0.390625, 1 )
|
||||
albedo_texture = ExtResource( 10 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 1, 0.886353, 0.617188, 1 )
|
||||
emission_energy = 1.0
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Parameters", "Particles Anim" ]
|
||||
|
||||
[sub_resource type="QuadMesh" id=9]
|
||||
|
||||
material = SubResource( 8 )
|
||||
size = Vector2( 0.4, 0.4 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=10]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = false
|
||||
flags_unshaded = true
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 2
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 3
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = 0
|
||||
albedo_color = Color( 0.390625, 0.390625, 0.390625, 1 )
|
||||
albedo_texture = ExtResource( 11 )
|
||||
metallic = 0.0
|
||||
metallic_specular = 0.5
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 1, 0.886353, 0.617188, 1 )
|
||||
emission_energy = 1.0
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
emission_texture = ExtResource( 11 )
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = false
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Parameters", "Particles Anim" ]
|
||||
|
||||
[sub_resource type="QuadMesh" id=11]
|
||||
|
||||
material = SubResource( 10 )
|
||||
size = Vector2( 0.4, 0.4 )
|
||||
|
||||
[node name="Game" type="Spatial"]
|
||||
|
||||
[node name="Character" type="KinematicBody" parent="." index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 0.589355, 0, 0, 0, 1, -0.0409546, 1.06519, 6.02408 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
axis_lock_linear_x = false
|
||||
axis_lock_linear_y = false
|
||||
axis_lock_linear_z = false
|
||||
axis_lock_angular_x = false
|
||||
axis_lock_angular_y = false
|
||||
axis_lock_angular_z = false
|
||||
collision/safe_margin = 0.001
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="Character" index="0"]
|
||||
|
||||
transform = Transform( 1.16184, 0, 0, 0, -5.07856e-08, -1.16184, 0, 1.16184, -5.07856e-08, 0, 2.33476, 0 )
|
||||
shape = SubResource( 1 )
|
||||
disabled = false
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Camera_rotation_helper" type="Spatial" parent="Character" index="1"]
|
||||
|
||||
[node name="Camera" type="Camera" parent="Character/Camera_rotation_helper" index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.01783, 0 )
|
||||
keep_aspect = 1
|
||||
cull_mask = 1048575
|
||||
environment = null
|
||||
h_offset = 0.0
|
||||
v_offset = 0.0
|
||||
doppler_tracking = 0
|
||||
projection = 0
|
||||
current = false
|
||||
fov = 70.0
|
||||
size = 1.0
|
||||
near = 0.05
|
||||
far = 100.0
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Flashlight" type="SpotLight" parent="Character/Camera_rotation_helper/Camera" index="0"]
|
||||
|
||||
visible = false
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 2.0
|
||||
light_indirect_energy = 2.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_bake_mode = 1
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = true
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.15
|
||||
shadow_contact = 0.0
|
||||
shadow_reverse_cull_face = true
|
||||
editor_only = false
|
||||
spot_range = 7.5843
|
||||
spot_attenuation = 1.0
|
||||
spot_angle = 41.0327
|
||||
spot_angle_attenuation = 1.0
|
||||
_sections_unfolded = [ "Light", "Shadow" ]
|
||||
|
||||
[node name="World" type="Spatial" parent="." index="1"]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="World" index="0"]
|
||||
|
||||
environment = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="Terrain" type="Spatial" parent="World" index="1"]
|
||||
|
||||
[node name="Ground" type="StaticBody" parent="World/Terrain" index="0"]
|
||||
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
constant_linear_velocity = Vector3( 0, 0, 0 )
|
||||
constant_angular_velocity = Vector3( 0, 0, 0 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Terrain/Ground" index="0"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 2 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Terrain/Ground" index="1"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
|
||||
[node name="Wall1" type="StaticBody" parent="World/Terrain" index="1"]
|
||||
|
||||
transform = Transform( -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, -10, 10, 0 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
constant_linear_velocity = Vector3( 0, 0, 0 )
|
||||
constant_angular_velocity = Vector3( 0, 0, 0 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Terrain/Wall1" index="0"]
|
||||
|
||||
transform = Transform( -4.37114e-07, 0, -10, 0, 10, 0, 10, 0, -4.37114e-07, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 2 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Terrain/Wall1" index="1"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Wall2" type="StaticBody" parent="World/Terrain" index="2"]
|
||||
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 10, 10, 0 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
constant_linear_velocity = Vector3( 0, 0, 0 )
|
||||
constant_angular_velocity = Vector3( 0, 0, 0 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Terrain/Wall2" index="0"]
|
||||
|
||||
transform = Transform( -4.37114e-07, 0, 10, 0, 10, 0, -10, 0, -4.37114e-07, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 2 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Terrain/Wall2" index="1"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
|
||||
[node name="Wall3" type="StaticBody" parent="World/Terrain" index="3"]
|
||||
|
||||
transform = Transform( 1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0, 10, -10 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
constant_linear_velocity = Vector3( 0, 0, 0 )
|
||||
constant_angular_velocity = Vector3( 0, 0, 0 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Terrain/Wall3" index="0"]
|
||||
|
||||
transform = Transform( -4.37114e-07, 0, 10, 0, 10, 0, -10, 0, -4.37114e-07, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 2 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Terrain/Wall3" index="1"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
|
||||
[node name="Wall4" type="StaticBody" parent="World/Terrain" index="4"]
|
||||
|
||||
transform = Transform( 1.91069e-15, 4.37114e-08, -1, 1, -4.37114e-08, 0, -4.37114e-08, -1, -4.37114e-08, 0, 10, 10 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
constant_linear_velocity = Vector3( 0, 0, 0 )
|
||||
constant_angular_velocity = Vector3( 0, 0, 0 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Terrain/Wall4" index="0"]
|
||||
|
||||
transform = Transform( -4.37114e-07, 0, 10, 0, 10, 0, -10, 0, -4.37114e-07, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 2 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Terrain/Wall4" index="1"]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||
shape = SubResource( 4 )
|
||||
disabled = false
|
||||
|
||||
[node name="OmniLight" type="OmniLight" parent="World" index="2"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.46929, 4.14904, -7.50301 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 1.0
|
||||
light_indirect_energy = 1.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_bake_mode = 1
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = true
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.1
|
||||
shadow_contact = 0.05
|
||||
shadow_reverse_cull_face = false
|
||||
editor_only = false
|
||||
omni_range = 14.0233
|
||||
omni_attenuation = 2.0
|
||||
omni_shadow_mode = 1
|
||||
omni_shadow_detail = 1
|
||||
_sections_unfolded = [ "Editor", "Light", "Omni", "Shadow", "Visibility" ]
|
||||
|
||||
[node name="Box" type="RigidBody" parent="World" index="3"]
|
||||
|
||||
transform = Transform( 0.640199, 0.768209, 0, -0.650662, 0.542239, -0.531616, -0.408393, 0.34034, 0.846985, 1.68693, 3.13013, -6.48976 )
|
||||
input_ray_pickable = true
|
||||
input_capture_on_drag = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 1.0
|
||||
custom_integrator = false
|
||||
continuous_cd = false
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
axis_lock_linear_x = false
|
||||
axis_lock_linear_y = false
|
||||
axis_lock_linear_z = false
|
||||
axis_lock_angular_x = false
|
||||
axis_lock_angular_y = false
|
||||
axis_lock_angular_z = false
|
||||
linear_velocity = Vector3( 0, 0, 0 )
|
||||
linear_damp = -1.0
|
||||
angular_velocity = Vector3( 0, 0, 0 )
|
||||
angular_damp = -1.0
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="World/Box" index="0"]
|
||||
|
||||
transform = Transform( 1, 1.49012e-08, 0, 2.68221e-07, 1, -5.96046e-08, -2.98023e-08, 1.19209e-07, 1, 0.0656062, -0.054674, 0.0536029 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 5 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 6 )
|
||||
_sections_unfolded = [ "Geometry", "LOD", "material" ]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="World/Box" index="1"]
|
||||
|
||||
transform = Transform( 1, 1.49012e-08, 0, 1.3411e-07, 1, 0, 2.98023e-08, -2.98023e-08, 1, 0, 0, 0 )
|
||||
shape = SubResource( 7 )
|
||||
disabled = false
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="CubeShaderTest" parent="World" index="4" instance=ExtResource( 8 )]
|
||||
|
||||
transform = Transform( -0.471909, 0, -0.881647, 0, 1, 0, 0.881647, 0, -0.471909, 4, 2, 3.11353 )
|
||||
|
||||
[node name="fire_01" parent="World" index="5" instance=ExtResource( 9 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.60514, 0.220215, -2.3728 )
|
||||
visibility_aabb = AABB( -4, -4.04395, -3.96729, 8, 8, 8 )
|
||||
draw_passes = 2
|
||||
draw_pass_1 = SubResource( 9 )
|
||||
draw_pass_2 = SubResource( 11 )
|
||||
|
||||
|
61
scenes/Game/firecamp.tscn
Normal file
|
@ -0,0 +1,61 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/materials/ps_fire_01.tres" type="Material" id=1]
|
||||
[ext_resource path="res://assets/Game/materials/flamme_01.tres" type="QuadMesh" id=2]
|
||||
[ext_resource path="res://scenes/Game/smoke.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="fire_01" type="Particles"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 0
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
emitting = true
|
||||
amount = 16
|
||||
lifetime = 5.0
|
||||
one_shot = false
|
||||
preprocess = 0.5
|
||||
speed_scale = 4.5
|
||||
explosiveness = 0.0
|
||||
randomness = 1.0
|
||||
fixed_fps = 0
|
||||
fract_delta = true
|
||||
visibility_aabb = AABB( -4, -4, -3.96729, 8, 8, 8 )
|
||||
local_coords = false
|
||||
draw_order = 0
|
||||
process_material = ExtResource( 1 )
|
||||
draw_passes = 1
|
||||
draw_pass_1 = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "Process Material", "Time", "Transform", "Visibility" ]
|
||||
|
||||
[node name="OmniLight" type="OmniLight" parent="." index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.305395, 0 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 0.5
|
||||
light_indirect_energy = 1.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_bake_mode = 1
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = true
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.15
|
||||
shadow_contact = 0.0
|
||||
shadow_reverse_cull_face = false
|
||||
editor_only = false
|
||||
omni_range = 5.0
|
||||
omni_attenuation = 1.0
|
||||
omni_shadow_mode = 1
|
||||
omni_shadow_detail = 1
|
||||
_sections_unfolded = [ "Light", "Shadow" ]
|
||||
|
||||
[node name="smoke" parent="." index="1" instance=ExtResource( 3 )]
|
||||
|
||||
|
41
scenes/Game/smoke.tscn
Normal file
|
@ -0,0 +1,41 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Game/materials/ps_smoke_01.tres" type="Material" id=1]
|
||||
[ext_resource path="res://assets/Game/materials/smoke_mesh_02.tres" type="QuadMesh" id=2]
|
||||
[ext_resource path="res://assets/Game/materials/smoke_mesh_01.tres" type="QuadMesh" id=3]
|
||||
[ext_resource path="res://assets/Game/materials/smoke_mesh_04.tres" type="QuadMesh" id=4]
|
||||
[ext_resource path="res://assets/Game/materials/smoke_mesh_05.tres" type="QuadMesh" id=5]
|
||||
|
||||
[node name="smoke" type="Particles"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
emitting = true
|
||||
amount = 30
|
||||
lifetime = 4.0
|
||||
one_shot = false
|
||||
preprocess = 1.0
|
||||
speed_scale = 0.1
|
||||
explosiveness = 0.0
|
||||
randomness = 0.0
|
||||
fixed_fps = 0
|
||||
fract_delta = true
|
||||
visibility_aabb = AABB( -4.36976, -0.176441, -7.10573, 8.73952, 14.8617, 11.7749 )
|
||||
local_coords = false
|
||||
draw_order = 0
|
||||
process_material = ExtResource( 1 )
|
||||
draw_passes = 4
|
||||
draw_pass_1 = ExtResource( 2 )
|
||||
draw_pass_2 = ExtResource( 3 )
|
||||
draw_pass_3 = ExtResource( 4 )
|
||||
draw_pass_4 = ExtResource( 5 )
|
||||
_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "Process Material", "Time" ]
|
||||
|
||||
|
27
scenes/Main.gd
Normal file
|
@ -0,0 +1,27 @@
|
|||
extends Node
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
const WINDOW_TITLE_INPUT = "GUI/Settings/Menus/TabContainer/Test/ScrollContainer/VBoxContainer/TitleBox/Title"
|
||||
|
||||
func _ready():
|
||||
change_title()
|
||||
get_tree().get_root().connect("size_changed", self, "on_window_size_changed")
|
||||
|
||||
$GUI.pause()
|
||||
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func on_window_size_changed():
|
||||
change_title()
|
||||
|
||||
func change_title():
|
||||
var title_node = get_node( WINDOW_TITLE_INPUT )
|
||||
var title = "Khanat"
|
||||
if title_node and not title_node.text.strip_edges() == "":
|
||||
title = title_node.text.strip_edges()
|
||||
title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
|
||||
OS.set_window_title( title )
|
19
scenes/Main.tscn
Normal file
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/GUI/GUI.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scenes/Game/Game.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Main" type="Node" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="GUI" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
pause_mode = 2
|
||||
_sections_unfolded = [ "Margin", "Pause", "Rect", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="Game" parent="." index="1" instance=ExtResource( 3 )]
|
||||
|
||||
|