(potetial noise) improved assets, gameplay, workflow, moving towards blender-2.80
@@ -46,6 +46,8 @@ func add_cheer_game_location(team: int, loc: Vector3):
|
||||
func set_team_start(team: int, v: Vector3):
|
||||
_team_start[team] = v
|
||||
_game_area = _game_area.expand(v)
|
||||
func check_goal(gate):
|
||||
pass
|
||||
func set_team_gate(team: int, gate: Area):
|
||||
_gates[team] = gate
|
||||
gate2team[gate] = team
|
||||
@@ -54,6 +56,7 @@ func set_team_gate(team: int, gate: Area):
|
||||
_game_area = _game_area.expand(o)
|
||||
func set_main(n):
|
||||
_main = n
|
||||
var start_timeout = 10.0
|
||||
func start_game():
|
||||
var ball = _ball_instance
|
||||
ball.add_to_group("ball")
|
||||
@@ -64,7 +67,8 @@ func start_game():
|
||||
print(ch)
|
||||
assert ch.scene != null
|
||||
print("start: ", _team_start[t])
|
||||
ch.scene.walkto(_team_start[t])
|
||||
ch.scene.walkto(_team_start[t] + Vector3(randf() * 2.0 - 1.0, 0.0, randf() * 2.0 - 1.0))
|
||||
start_timeout = 10.0
|
||||
var loc = 0
|
||||
for t in _cheers.keys():
|
||||
for ch in _cheers[t]:
|
||||
@@ -90,3 +94,26 @@ func stop_game():
|
||||
world.increase_xp(e, min(e.xp * 2, min(100 * e.level, 1000)))
|
||||
for e in _cheers[winner_team]:
|
||||
world.increase_xp(e, min(e.xp * 2, min(200 * e.level, 2000)))
|
||||
func _physics_process(delta):
|
||||
match(_state):
|
||||
STATE_START:
|
||||
start_timeout -= delta
|
||||
# print("timeout")
|
||||
if start_timeout <= 0.0:
|
||||
for t in _teams.keys():
|
||||
for ch in _teams[t]:
|
||||
# print("teleport")
|
||||
ch.scene.global_transform.origin = ch.scene._path[ch.scene._path.size() - 1]
|
||||
_state = STATE_RUNNING
|
||||
STATE_RUNNING:
|
||||
# print("running")
|
||||
var tgt = _ball_instance.global_transform.origin
|
||||
for t in _teams.keys():
|
||||
for ch in _teams[t]:
|
||||
if ch.scene._path && ch.scene._path.size() > 0:
|
||||
var moveto = ch.scene._path[ch.scene._path.size() - 1]
|
||||
if tgt.distance_squared_to(moveto) > 0.5:
|
||||
# print("walking")
|
||||
ch.scene.walkto(tgt)
|
||||
else:
|
||||
ch.scene.walkto(tgt)
|
||||
|
||||
BIN
proto2/assets/blender-2.79/level-kit.blend
Normal file
BIN
proto2/assets/blender-2.80/building.blend
Normal file
BIN
proto2/assets/blender-2.80/building.blend1
Normal file
7026
proto2/assets/blender-2.80/building.dae
Normal file
35
proto2/assets/blender-2.80/building.mtl
Normal file
@@ -0,0 +1,35 @@
|
||||
# Blender MTL File: 'building.blend'
|
||||
# Material Count: 3
|
||||
|
||||
newmtl closet_walls
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.393915 0.393915 0.393915
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd -s 12.000000 12.000000 12.000000 /home/slapin/godot-projects/kicking-high/proto2/assets/textures/concrete/concrete_floor_02_diff_1k.jpg
|
||||
map_Ks -s 12.000000 12.000000 12.000000 /home/slapin/godot-projects/kicking-high/proto2/assets/textures/concrete/concrete_floor_02_spec_1k.jpg
|
||||
map_d -s 12.000000 12.000000 12.000000 /home/slapin/godot-projects/kicking-high/proto2/assets/textures/concrete/concrete_floor_02_diff_1k.jpg
|
||||
|
||||
newmtl floor
|
||||
Ns 35.999996
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.312691 0.180240
|
||||
Ks 0.083942 0.083942 0.083942
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
||||
|
||||
newmtl wall-kit
|
||||
Ns 113.777764
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.211242 0.211242 0.211242
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
||||
111359
proto2/assets/blender-2.80/building.obj
Normal file
BIN
proto2/assets/blender-2.80/concrete_floor_02_Disp_1k.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
proto2/assets/blender-2.80/concrete_floor_02_Nor_1k.jpg
Normal file
|
After Width: | Height: | Size: 890 KiB |
BIN
proto2/assets/blender-2.80/concrete_floor_02_diff_1k.jpg
Normal file
|
After Width: | Height: | Size: 758 KiB |
BIN
proto2/assets/blender-2.80/concrete_floor_02_rough_1k.jpg
Normal file
|
After Width: | Height: | Size: 311 KiB |
BIN
proto2/assets/blender-2.80/concrete_floor_02_spec_1k.jpg
Normal file
|
After Width: | Height: | Size: 558 KiB |
BIN
proto2/assets/blender-2.80/level-kit.blend
Normal file
BIN
proto2/assets/blender-2.80/level-kit.blend1
Normal file
2971
proto2/assets/blender-2.80/level-kit.escn
Normal file
5
proto2/assets/blender-2.80/level-kit.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"collections": ["outside-walls", "inside-walls", "inside-doors"],
|
||||
"object_types": ["EMPTY", "ARMATURE", "GEOMETRY"],
|
||||
"outpath": "walls"
|
||||
}
|
||||
BIN
proto2/assets/blender-2.80/level.b
Normal file
BIN
proto2/assets/blender-2.80/level.blend
Normal file
BIN
proto2/assets/blender-2.80/level.blend1
Normal file
5
proto2/assets/blender-2.80/level.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"collections": ["level"],
|
||||
"object_types": ["EMPTY", "ARMATURE", "GEOMETRY"],
|
||||
"outpath": "walls"
|
||||
}
|
||||
BIN
proto2/assets/blender-2.80/walls_diffuse.jpg
Normal file
|
After Width: | Height: | Size: 758 KiB |
BIN
proto2/assets/icons.kra
Normal file
BIN
proto2/assets/textures/concrete/concrete_floor_02_AO_1k.jpg
Normal file
|
After Width: | Height: | Size: 368 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_Disp_1k.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_Nor_1k.jpg
Normal file
|
After Width: | Height: | Size: 890 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_bump_1k.jpg
Normal file
|
After Width: | Height: | Size: 713 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_diff_1k.jpg
Normal file
|
After Width: | Height: | Size: 758 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_rough_1k.jpg
Normal file
|
After Width: | Height: | Size: 311 KiB |
BIN
proto2/assets/textures/concrete/concrete_floor_02_spec_1k.jpg
Normal file
|
After Width: | Height: | Size: 558 KiB |
BIN
proto2/assets/textures/icons.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
@@ -7,6 +7,7 @@ var master_node: Node
|
||||
var camera: Camera
|
||||
var monitored_objects = []
|
||||
var mon_labels = {}
|
||||
var talk_icon = preload("res://ui/act_talk.tscn")
|
||||
func _ready():
|
||||
pass
|
||||
func _process(delta):
|
||||
@@ -59,8 +60,12 @@ func _process(delta):
|
||||
if act_dist < 4.0 && monitored_objects.size() < 4:
|
||||
print("act2: ", act_obj, " ", act_dist)
|
||||
monitored_objects.push_back(act_obj)
|
||||
mon_labels[act_obj] = Label.new()
|
||||
mon_labels[act_obj].text = act_obj.get_act()
|
||||
if act_obj.is_in_group("characters"):
|
||||
mon_labels[act_obj] = talk_icon.instance()
|
||||
else:
|
||||
mon_labels[act_obj] = Button.new()
|
||||
mon_labels[act_obj].text = act_obj.get_act()
|
||||
mon_labels[act_obj].connect("pressed", self, "emit_signal", ["action1", act_obj])
|
||||
add_child(mon_labels[act_obj])
|
||||
mon_labels[act_obj].rect_position = camera.unproject_position(act_obj.global_transform.origin)
|
||||
for k in monitored_objects:
|
||||
@@ -85,15 +90,19 @@ func _unhandled_input(event):
|
||||
if event.button_mask & BUTTON_MASK_LEFT:
|
||||
click2d = event.position
|
||||
click2d_update = true
|
||||
print("click!")
|
||||
func _physics_process(delta):
|
||||
if click2d_update:
|
||||
print("click! 2")
|
||||
var space := camera.get_world().direct_space_state
|
||||
var ray_origin : = camera.project_ray_origin(click2d)
|
||||
var ray_normal : = camera.project_ray_normal(click2d)
|
||||
var result := space.intersect_ray(ray_origin, ray_origin + ray_normal * 120.0, [], 512, true, false)
|
||||
print(result)
|
||||
if result.has("position"):
|
||||
click3d = result.position
|
||||
click3d_update = true
|
||||
print("click! 3")
|
||||
emit_signal("user_click", click3d)
|
||||
click2d_update = false
|
||||
|
||||
|
||||
122
proto2/export.py
Normal file
@@ -0,0 +1,122 @@
|
||||
import bpy
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import json
|
||||
|
||||
TEST_SCENE_DIR = os.path.join(os.getcwd(), "assets/blender-2.80")
|
||||
EXPORTED_DIR = os.path.join(os.getcwd(), ".")
|
||||
|
||||
def export_escn(out_file, config):
|
||||
"""Fake the export operator call"""
|
||||
import io_scene_godot
|
||||
io_scene_godot.export(out_file, config)
|
||||
|
||||
def main():
|
||||
dir_queue = list()
|
||||
dir_queue.append('.')
|
||||
while dir_queue:
|
||||
dir_relpath = dir_queue.pop(0)
|
||||
|
||||
# read config file if present, otherwise use default
|
||||
src_dir_path = os.path.join(TEST_SCENE_DIR, dir_relpath)
|
||||
if os.path.exists(os.path.join(src_dir_path, "config.json")):
|
||||
with open(os.path.join(src_dir_path, "config.json")) as config_file:
|
||||
config = json.load(config_file)
|
||||
else:
|
||||
config = {
|
||||
"outpath": "exports",
|
||||
"collections": [],
|
||||
"use_visible_objects": True,
|
||||
"use_export_selected": False,
|
||||
"use_mesh_modifiers": True,
|
||||
"use_exclude_ctrl_bone": False,
|
||||
"use_export_animation": True,
|
||||
"use_export_material": True,
|
||||
"use_export_shape_key": True,
|
||||
"use_stashed_action": True,
|
||||
"use_beta_features": True,
|
||||
"generate_external_material": False,
|
||||
"animation_modes": "ACTIONS",
|
||||
"object_types": {"EMPTY", "LIGHT", "ARMATURE", "GEOMETRY"}
|
||||
}
|
||||
|
||||
# create exported to directory
|
||||
exported_dir_path = os.path.join(EXPORTED_DIR, dir_relpath)
|
||||
if not os.path.exists(exported_dir_path):
|
||||
os.makedirs(exported_dir_path)
|
||||
|
||||
for item in os.listdir(os.path.join(TEST_SCENE_DIR, dir_relpath)):
|
||||
item_abspath = os.path.join(TEST_SCENE_DIR, dir_relpath, item)
|
||||
if os.path.isdir(item_abspath):
|
||||
# push dir into queue for later traversal
|
||||
dir_queue.append(os.path.join(dir_relpath, item))
|
||||
elif item_abspath.endswith('blend'):
|
||||
cpath = item_abspath.replace('.blend', '.json')
|
||||
if os.path.exists(cpath):
|
||||
_config = json.load(open(cpath))
|
||||
for k, v in _config.items():
|
||||
if k == "object_types":
|
||||
config[k] = set(v)
|
||||
else:
|
||||
config[k] = v
|
||||
# export blend file
|
||||
print("---------")
|
||||
print("Exporting {}".format(os.path.abspath(item_abspath)))
|
||||
bpy.ops.wm.open_mainfile(filepath=item_abspath)
|
||||
dirpath = os.path.join(EXPORTED_DIR,
|
||||
dir_relpath,
|
||||
config["outpath"]
|
||||
)
|
||||
if not os.path.exists(dirpath):
|
||||
os.makedirs(dirpath, 0o755, True)
|
||||
|
||||
out_path = os.path.join(
|
||||
EXPORTED_DIR,
|
||||
dir_relpath,
|
||||
config["outpath"],
|
||||
item.replace('.blend', '.escn')
|
||||
)
|
||||
if len(config["collections"]) > 0:
|
||||
for cur_col in config["collections"]:
|
||||
col_keep = {}
|
||||
for c in bpy.data.collections:
|
||||
col_keep[c.name] = c.hide_viewport
|
||||
if c.name == cur_col:
|
||||
c.hide_viewport = False
|
||||
elif c.name in config["collections"]:
|
||||
c.hide_viewport = True
|
||||
out_path = os.path.join(
|
||||
EXPORTED_DIR,
|
||||
dir_relpath,
|
||||
config["outpath"],
|
||||
item.replace('.blend', '') + "_" + cur_col + ".escn"
|
||||
)
|
||||
export_escn(out_path, config)
|
||||
for c in bpy.data.collections:
|
||||
c.hide_viewport=col_keep[c.name]
|
||||
print("Exported to {}".format(os.path.abspath(out_path)))
|
||||
else:
|
||||
out_path = os.path.join(
|
||||
EXPORTED_DIR,
|
||||
dir_relpath,
|
||||
config["outpath"],
|
||||
item.replace('.blend', '.escn')
|
||||
)
|
||||
export_escn(out_path, config)
|
||||
print("Exported to {}".format(os.path.abspath(out_path)))
|
||||
|
||||
|
||||
def run_with_abort(function):
|
||||
"""Runs a function such that an abort causes blender to quit with an error
|
||||
code. Otherwise, even a failed script will allow the Makefile to continue
|
||||
running"""
|
||||
try:
|
||||
function()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_with_abort(main)
|
||||
1040
proto2/exports/building.escn
Normal file
1062
proto2/exports/building.escn.import
Normal file
BIN
proto2/exports/concrete_floor_02_Disp_1k.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
34
proto2/exports/concrete_floor_02_Disp_1k.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/concrete_floor_02_Disp_1k.jpg-f5a8820689418248b74535a6828f310f.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://exports/concrete_floor_02_Disp_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_Disp_1k.jpg-f5a8820689418248b74535a6828f310f.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
proto2/exports/concrete_floor_02_Nor_1k.jpg
Normal file
|
After Width: | Height: | Size: 890 KiB |
34
proto2/exports/concrete_floor_02_Nor_1k.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/concrete_floor_02_Nor_1k.jpg-46307d608c87218b8c4a7a509ade6943.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://exports/concrete_floor_02_Nor_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_Nor_1k.jpg-46307d608c87218b8c4a7a509ade6943.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
proto2/exports/concrete_floor_02_diff_1k.jpg
Normal file
|
After Width: | Height: | Size: 758 KiB |
34
proto2/exports/concrete_floor_02_diff_1k.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/concrete_floor_02_diff_1k.jpg-bcd18a07b1306945017e73559ddedb2b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://exports/concrete_floor_02_diff_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_diff_1k.jpg-bcd18a07b1306945017e73559ddedb2b.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
proto2/exports/concrete_floor_02_rough_1k.jpg
Normal file
|
After Width: | Height: | Size: 311 KiB |
34
proto2/exports/concrete_floor_02_rough_1k.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/concrete_floor_02_rough_1k.jpg-a272c48534befef51ee87d18617197ae.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://exports/concrete_floor_02_rough_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_rough_1k.jpg-a272c48534befef51ee87d18617197ae.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
proto2/exports/concrete_floor_02_spec_1k.jpg
Normal file
|
After Width: | Height: | Size: 558 KiB |
34
proto2/exports/concrete_floor_02_spec_1k.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/concrete_floor_02_spec_1k.jpg-ae937515bcf099b88fb0fa01effb653a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://exports/concrete_floor_02_spec_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_spec_1k.jpg-ae937515bcf099b88fb0fa01effb653a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
7355
proto2/exports/level-kit.escn
Normal file
1062
proto2/exports/level-kit.escn.import
Normal file
14
proto2/exports/level.escn
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=1 format=2]
|
||||
|
||||
[node type="Spatial" name="Scene"]
|
||||
|
||||
[node name="Light" type="OmniLight" parent="."]
|
||||
|
||||
light_specular = 1.0
|
||||
light_color = Color(1.0, 1.0, 1.0, 1.0)
|
||||
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
|
||||
light_energy = 10.0
|
||||
omni_range = 30.0
|
||||
transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
|
||||
light_negative = false
|
||||
shadow_enabled = true
|
||||
1062
proto2/exports/level.escn.import
Normal file
@@ -9,6 +9,7 @@ var frame_tf: Transform = Transform()
|
||||
var ball_game : BallGameAI3D
|
||||
|
||||
func master_control(pos):
|
||||
print("walkto: ", pos)
|
||||
var n = lerp(world.master_node.get_walk_speed(), 3.8, 0.1)
|
||||
world.master_node.set_walk_speed(n)
|
||||
$master.walkto(pos)
|
||||
@@ -59,8 +60,19 @@ func start_training(ball):
|
||||
ball_game.set_ball(ball)
|
||||
ball_game.set_main(self)
|
||||
ball_game.start_game()
|
||||
add_child(ball_game)
|
||||
|
||||
func _ready():
|
||||
var tstart = $nav/navmesh/level_level
|
||||
var queue = [tstart]
|
||||
while queue.size() > 0:
|
||||
var item = queue[0]
|
||||
queue.pop_front()
|
||||
if item is StaticBody:
|
||||
item.collision_layer = 512
|
||||
item.collision_mask = 1 | 512
|
||||
for c in item.get_children():
|
||||
queue.push_back(c)
|
||||
$master.add_to_group("master")
|
||||
controls.master_node = $master
|
||||
world.master_node = $master
|
||||
|
||||
37
proto2/ui/act_talk.tscn
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://ui/icons.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0.6, 0.6, 0.6, 0 )
|
||||
border_color = Color( 0.8, 0.8, 0.8, 0 )
|
||||
border_blend = true
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
bg_color = Color( 0.6, 0.6, 0.6, 0 )
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=3]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=4]
|
||||
bg_color = Color( 0.6, 0.6, 0.6, 0 )
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=5]
|
||||
bg_color = Color( 0.6, 0.6, 0.6, 0 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 8, 945, 92, 80 )
|
||||
|
||||
[node name="act_talk" type="Button"]
|
||||
margin_right = 96.0
|
||||
margin_bottom = 86.0
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 3 )
|
||||
custom_styles/disabled = SubResource( 4 )
|
||||
custom_styles/normal = SubResource( 5 )
|
||||
icon = SubResource( 6 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
BIN
proto2/ui/icons.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
34
proto2/ui/icons.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icons.png-b3c2b795b15b796fe84afb6b02bedd32.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/icons.png"
|
||||
dest_files=[ "res://.import/icons.png-b3c2b795b15b796fe84afb6b02bedd32.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/building.glb
Normal file
1062
proto2/walls/building.glb.import
Normal file
1040
proto2/walls/building_level.escn
Normal file
1062
proto2/walls/building_level.escn.import
Normal file
BIN
proto2/walls/closet_walls.material
Normal file
BIN
proto2/walls/concrete_floor_02_Disp_1k.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
36
proto2/walls/concrete_floor_02_Disp_1k.jpg.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/concrete_floor_02_Disp_1k.jpg-4c6a8b863354ec552c7d71ddf8e6b65b.s3tc.stex"
|
||||
path.etc2="res://.import/concrete_floor_02_Disp_1k.jpg-4c6a8b863354ec552c7d71ddf8e6b65b.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://walls/concrete_floor_02_Disp_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_Disp_1k.jpg-4c6a8b863354ec552c7d71ddf8e6b65b.s3tc.stex", "res://.import/concrete_floor_02_Disp_1k.jpg-4c6a8b863354ec552c7d71ddf8e6b65b.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/concrete_floor_02_Nor_1k.jpg
Normal file
|
After Width: | Height: | Size: 890 KiB |
36
proto2/walls/concrete_floor_02_Nor_1k.jpg.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/concrete_floor_02_Nor_1k.jpg-3e3ca4b4ade9320e30d38594fa118eb4.s3tc.stex"
|
||||
path.etc2="res://.import/concrete_floor_02_Nor_1k.jpg-3e3ca4b4ade9320e30d38594fa118eb4.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://walls/concrete_floor_02_Nor_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_Nor_1k.jpg-3e3ca4b4ade9320e30d38594fa118eb4.s3tc.stex", "res://.import/concrete_floor_02_Nor_1k.jpg-3e3ca4b4ade9320e30d38594fa118eb4.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/concrete_floor_02_diff_1k.jpg
Normal file
|
After Width: | Height: | Size: 758 KiB |
36
proto2/walls/concrete_floor_02_diff_1k.jpg.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/concrete_floor_02_diff_1k.jpg-01b0d14de34b948cddc1d322b847322f.s3tc.stex"
|
||||
path.etc2="res://.import/concrete_floor_02_diff_1k.jpg-01b0d14de34b948cddc1d322b847322f.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://walls/concrete_floor_02_diff_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_diff_1k.jpg-01b0d14de34b948cddc1d322b847322f.s3tc.stex", "res://.import/concrete_floor_02_diff_1k.jpg-01b0d14de34b948cddc1d322b847322f.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/concrete_floor_02_rough_1k.jpg
Normal file
|
After Width: | Height: | Size: 311 KiB |
36
proto2/walls/concrete_floor_02_rough_1k.jpg.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/concrete_floor_02_rough_1k.jpg-07358e904920e1336a630bf5aa26042f.s3tc.stex"
|
||||
path.etc2="res://.import/concrete_floor_02_rough_1k.jpg-07358e904920e1336a630bf5aa26042f.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://walls/concrete_floor_02_rough_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_rough_1k.jpg-07358e904920e1336a630bf5aa26042f.s3tc.stex", "res://.import/concrete_floor_02_rough_1k.jpg-07358e904920e1336a630bf5aa26042f.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/concrete_floor_02_spec_1k.jpg
Normal file
|
After Width: | Height: | Size: 558 KiB |
36
proto2/walls/concrete_floor_02_spec_1k.jpg.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/concrete_floor_02_spec_1k.jpg-6f7705df911115a02b291c92413fa4ca.s3tc.stex"
|
||||
path.etc2="res://.import/concrete_floor_02_spec_1k.jpg-6f7705df911115a02b291c92413fa4ca.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://walls/concrete_floor_02_spec_1k.jpg"
|
||||
dest_files=[ "res://.import/concrete_floor_02_spec_1k.jpg-6f7705df911115a02b291c92413fa4ca.s3tc.stex", "res://.import/concrete_floor_02_spec_1k.jpg-6f7705df911115a02b291c92413fa4ca.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
proto2/walls/corridoor1.material
Normal file
BIN
proto2/walls/entry_walls.material
Normal file
BIN
proto2/walls/female_dormitory_walls.material
Normal file
BIN
proto2/walls/female_showers_walls.material
Normal file
BIN
proto2/walls/floor.material
Normal file
BIN
proto2/walls/fmale_dormitory_entry.material
Normal file
BIN
proto2/walls/gym_walls.material
Normal file
3187
proto2/walls/inside_doors.tres
Normal file
2987
proto2/walls/inside_walls.tres
Normal file
3049
proto2/walls/level-kit_inside-doors.escn
Normal file
1062
proto2/walls/level-kit_inside-doors.escn.import
Normal file
5
proto2/walls/level-kit_inside-doors.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://walls/level-kit_inside-doors.escn" type="PackedScene" id=1]
|
||||
|
||||
[node name="level-kit_inside-doors" index="0" instance=ExtResource( 1 )]
|
||||
2852
proto2/walls/level-kit_inside-walls.escn
Normal file
1062
proto2/walls/level-kit_inside-walls.escn.import
Normal file
5
proto2/walls/level-kit_inside-walls.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://walls/level-kit_inside-walls.escn" type="PackedScene" id=1]
|
||||
|
||||
[node name="level-kit_inside-walls" index="0" instance=ExtResource( 1 )]
|
||||
2251
proto2/walls/level-kit_outside-walls.escn
Normal file
1062
proto2/walls/level-kit_outside-walls.escn.import
Normal file
5
proto2/walls/level-kit_outside-walls.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://walls/level-kit_outside-walls.escn" type="PackedScene" id=1]
|
||||
|
||||
[node name="level-kit_outside-walls" index="0" instance=ExtResource( 1 )]
|
||||