proto3 initial commit

This commit is contained in:
Segey Lapin
2020-04-13 12:45:25 +03:00
parent 69410badf6
commit 1084b6d5c3
1588 changed files with 368852 additions and 23 deletions

View File

@@ -55,7 +55,8 @@ var master_stats:Dictionary = {
"xp": 0,
"mext_xp": 100,
"points": 5,
"level": 1
"level": 1,
"look": {}
}
func new_candidate() -> Dictionary:

View File

@@ -300,6 +300,10 @@ func build_contols():
$s/VBoxContainer/ok.show()
$s/VBoxContainer/ok.connect("pressed", self, "next_scene")
func next_scene():
var looks = {}
for e in characters.get_modifier_list(ch):
looks[e] = characters.get_modifier_value(ch, e)
world.master_stats.look = looks
var scene = load(world.next_scene)
get_tree().change_scene_to(scene)
func _process(delta):

View File

@@ -93,8 +93,15 @@ func update_training(score):
func spawn_character(cd, xform, k):
var char_sc = characters.spawn_character(cd.gender, xform)
cd.scene = char_sc
if !cd.has("look"):
cd.look = {}
for k in characters.get_modifier_list(char_sc):
cd.look[k] = (randf() - 0.5) * 1.7
for k in cd.look:
characters.set_modifier_value(char_sc, k, cd.look[k])
cd.id = k
char_sc.set_meta("data", cd)
return char_sc
func characters_done():
characters.update()
characters.update()
@@ -116,6 +123,9 @@ func _ready():
$master.queue_free()
master = characters.spawn_character(0, master_xform)
master.add_to_group("master")
for e in world.master_stats.look.keys():
characters.set_modifier_value(master,
e, world.master_stats.look[e])
controls.master_node = master
world.master_node = master
# $master.add_to_group("master")

View File

@@ -4,6 +4,7 @@
[ext_resource path="res://vehicles/vehicle_camera.gd" type="Script" id=2]
[ext_resource path="res://vehicles/cars/car_car1.tscn" type="PackedScene" id=3]
[ext_resource path="res://fonts/DroidSansFallback.ttf" type="DynamicFontData" id=4]
[ext_resource path="res://vehicles/cars/car_car1.gd" type="Script" id=5]
[sub_resource type="ProceduralSky" id=1]
sky_energy = 0.7
@@ -16,16 +17,6 @@ background_sky = SubResource( 1 )
[sub_resource type="BoxShape" id=3]
extents = Vector3( 100, 0.2, 100 )
[sub_resource type="CubeMesh" id=4]
size = Vector3( 8, 0.2, 300 )
subdivide_width = 4
subdivide_depth = 300
[sub_resource type="SpatialMaterial" id=5]
albedo_color = Color( 0.34902, 0.34902, 0.34902, 1 )
metallic = 0.1
roughness = 0.8
[sub_resource type="BoxShape" id=6]
extents = Vector3( 2, 1, 8 )
@@ -34,7 +25,7 @@ albedo_color = Color( 0.176471, 0.678431, 0.243137, 1 )
[sub_resource type="PlaneMesh" id=8]
material = SubResource( 7 )
size = Vector2( 100, 300 )
size = Vector2( 500, 500 )
subdivide_width = 200
subdivide_depth = 200
@@ -50,6 +41,12 @@ use_mipmaps = true
use_filter = true
font_data = ExtResource( 4 )
[sub_resource type="Curve3D" id=12]
_data = {
"points": PoolVector3Array( 0, 0, 0, 0, 0, 0, 0, 0.0477028, 249.534, 0, 0, 0, 0, 0, 0, 0.478584, 0.121107, 172.663, 0, 0, 0, 0, 0, 0, 1.43492, 0.309249, 50.4076, 0, 0, 0, 0, 0, 0, 1.4357, 0.309245, -38.5009, 0, 0, 0, 0, 0, 0, 0.478808, 0.556122, -101.267, 0, 0, 0, 0, 0, 0, 0.478547, 0.777313, -249.082 ),
"tilts": PoolRealArray( 0, 0, 0, 0, 0, 0 )
}
[node name="prologue" type="Spatial"]
script = ExtResource( 1 )
@@ -73,15 +70,11 @@ shadow_enabled = true
[node name="car1" parent="." instance=ExtResource( 3 )]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49955, 0.445234, 41.5646 )
script = ExtResource( 5 )
[node name="cam" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, 0 )
[node name="road" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.1, 0 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )
[node name="Area" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.03741, 0, -80.0024 )
@@ -93,12 +86,6 @@ shape = SubResource( 6 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0.4, 76.3702 )
[node name="ground" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -54, 0, 0 )
mesh = SubResource( 8 )
material/0 = null
[node name="ground2" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 54, 0, 0 )
mesh = SubResource( 8 )
material/0 = null
@@ -122,3 +109,20 @@ custom_colors/font_color_shadow = Color( 0.564706, 0.109804, 0.109804, 0.384314
__meta__ = {
"_edit_use_anchors_": true
}
[node name="road" type="CSGPolygon" parent="."]
use_collision = true
polygon = PoolVector2Array( -6, 0, -6, 0.05, 6, 0.05, 6, 0 )
mode = 2
path_node = NodePath("../Path")
path_interval = 1.0
path_rotation = 1
path_local = false
path_continuous_u = false
path_joined = false
__meta__ = {
"_edit_lock_": true
}
[node name="Path" type="Path" parent="."]
curve = SubResource( 12 )