diff options
Diffstat (limited to 'demos/3d/truck_town')
-rw-r--r-- | demos/3d/truck_town/car_base.scn | bin | 13459 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/car_select.gd | 32 | ||||
-rw-r--r-- | demos/3d/truck_town/car_select.scn | bin | 1968 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/cement.tex | bin | 169836 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/choose_tow.png | bin | 20702 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/choose_trailer.png | bin | 15646 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/choose_van.png | bin | 10106 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/crane.scn | bin | 26350 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/engine.cfg | 14 | ||||
-rw-r--r-- | demos/3d/truck_town/follow_camera.gd | 57 | ||||
-rw-r--r-- | demos/3d/truck_town/grass.tex | bin | 177762 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/icon.png | bin | 6878 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/trailer_truck.scn | bin | 22400 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/truck_scene.scn | bin | 1889480 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/trucktown.scn | bin | 165689 -> 0 bytes | |||
-rw-r--r-- | demos/3d/truck_town/vehicle.gd | 45 |
16 files changed, 0 insertions, 148 deletions
diff --git a/demos/3d/truck_town/car_base.scn b/demos/3d/truck_town/car_base.scn Binary files differdeleted file mode 100644 index acfbfae162..0000000000 --- a/demos/3d/truck_town/car_base.scn +++ /dev/null diff --git a/demos/3d/truck_town/car_select.gd b/demos/3d/truck_town/car_select.gd deleted file mode 100644 index 4efcf63426..0000000000 --- a/demos/3d/truck_town/car_select.gd +++ /dev/null @@ -1,32 +0,0 @@ - -extends Control - -# Member variables -var town = null - - -func _back(): - town.queue_free() - show() - - -func _load_scene(car): - var tt = load(car).instance() - tt.set_name("car") - town = load("res://truck_scene.scn").instance() - town.get_node("instance_pos").add_child(tt) - town.get_node("back").connect("pressed", self, "_back") - get_parent().add_child(town) - hide() - - -func _on_van_1_pressed(): - _load_scene("res://car_base.scn") - - -func _on_van_2_pressed(): - _load_scene("res://trailer_truck.scn") - - -func _on_van_3_pressed(): - _load_scene("res://crane.scn") diff --git a/demos/3d/truck_town/car_select.scn b/demos/3d/truck_town/car_select.scn Binary files differdeleted file mode 100644 index d838e995b2..0000000000 --- a/demos/3d/truck_town/car_select.scn +++ /dev/null diff --git a/demos/3d/truck_town/cement.tex b/demos/3d/truck_town/cement.tex Binary files differdeleted file mode 100644 index a80cde6464..0000000000 --- a/demos/3d/truck_town/cement.tex +++ /dev/null diff --git a/demos/3d/truck_town/choose_tow.png b/demos/3d/truck_town/choose_tow.png Binary files differdeleted file mode 100644 index 8f92833450..0000000000 --- a/demos/3d/truck_town/choose_tow.png +++ /dev/null diff --git a/demos/3d/truck_town/choose_trailer.png b/demos/3d/truck_town/choose_trailer.png Binary files differdeleted file mode 100644 index ead3330296..0000000000 --- a/demos/3d/truck_town/choose_trailer.png +++ /dev/null diff --git a/demos/3d/truck_town/choose_van.png b/demos/3d/truck_town/choose_van.png Binary files differdeleted file mode 100644 index 1ecdd54372..0000000000 --- a/demos/3d/truck_town/choose_van.png +++ /dev/null diff --git a/demos/3d/truck_town/crane.scn b/demos/3d/truck_town/crane.scn Binary files differdeleted file mode 100644 index dfddd97882..0000000000 --- a/demos/3d/truck_town/crane.scn +++ /dev/null diff --git a/demos/3d/truck_town/engine.cfg b/demos/3d/truck_town/engine.cfg deleted file mode 100644 index b2a463e1e2..0000000000 --- a/demos/3d/truck_town/engine.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[application] - -name="Truck Town" -main_scene="res://car_select.scn" -icon="res://icon.png" - -[display] - -width=1280 -height=720 - -[rasterizer] - -shadow_filter=3 diff --git a/demos/3d/truck_town/follow_camera.gd b/demos/3d/truck_town/follow_camera.gd deleted file mode 100644 index 7c6a0a2ba6..0000000000 --- a/demos/3d/truck_town/follow_camera.gd +++ /dev/null @@ -1,57 +0,0 @@ - -extends Camera - -# Member variables -var collision_exception = [] -export var min_distance = 0.5 -export var max_distance = 4.0 -export var angle_v_adjust = 0.0 -export var autoturn_ray_aperture = 25 -export var autoturn_speed = 50 -var max_height = 2.0 -var min_height = 0 - - -func _fixed_process(dt): - var target = get_parent().get_global_transform().origin - var pos = get_global_transform().origin - var up = Vector3(0, 1, 0) - - var delta = pos - target - - # Regular delta follow - - # Check ranges - if (delta.length() < min_distance): - delta = delta.normalized()*min_distance - elif (delta.length() > max_distance): - delta = delta.normalized()*max_distance - - # Check upper and lower height - if ( delta.y > max_height): - delta.y = max_height - if ( delta.y < min_height): - delta.y = min_height - - pos = target + delta - - look_at_from_pos(pos, target, up) - - # Turn a little up or down - var t = get_transform() - t.basis = Matrix3(t.basis[0], deg2rad(angle_v_adjust))*t.basis - set_transform(t) - - -func _ready(): - # Find collision exceptions for ray - var node = self - while(node): - if (node extends RigidBody): - collision_exception.append(node.get_rid()) - break - else: - node = node.get_parent() - set_fixed_process(true) - # This detaches the camera transform from the parent spatial node - set_as_toplevel(true) diff --git a/demos/3d/truck_town/grass.tex b/demos/3d/truck_town/grass.tex Binary files differdeleted file mode 100644 index c28d060697..0000000000 --- a/demos/3d/truck_town/grass.tex +++ /dev/null diff --git a/demos/3d/truck_town/icon.png b/demos/3d/truck_town/icon.png Binary files differdeleted file mode 100644 index 7d7bd42116..0000000000 --- a/demos/3d/truck_town/icon.png +++ /dev/null diff --git a/demos/3d/truck_town/trailer_truck.scn b/demos/3d/truck_town/trailer_truck.scn Binary files differdeleted file mode 100644 index 6fcf83e270..0000000000 --- a/demos/3d/truck_town/trailer_truck.scn +++ /dev/null diff --git a/demos/3d/truck_town/truck_scene.scn b/demos/3d/truck_town/truck_scene.scn Binary files differdeleted file mode 100644 index 0c1be13ce2..0000000000 --- a/demos/3d/truck_town/truck_scene.scn +++ /dev/null diff --git a/demos/3d/truck_town/trucktown.scn b/demos/3d/truck_town/trucktown.scn Binary files differdeleted file mode 100644 index 4a8f7e7e52..0000000000 --- a/demos/3d/truck_town/trucktown.scn +++ /dev/null diff --git a/demos/3d/truck_town/vehicle.gd b/demos/3d/truck_town/vehicle.gd deleted file mode 100644 index c4224577c6..0000000000 --- a/demos/3d/truck_town/vehicle.gd +++ /dev/null @@ -1,45 +0,0 @@ - -extends VehicleBody - -# Member variables -const STEER_SPEED = 1 -const STEER_LIMIT = 0.4 - -var steer_angle = 0 -var steer_target = 0 - -export var engine_force = 40 - - -func _fixed_process(delta): - if (Input.is_action_pressed("ui_left")): - steer_target = -STEER_LIMIT - elif (Input.is_action_pressed("ui_right")): - steer_target = STEER_LIMIT - else: - steer_target = 0 - - if (Input.is_action_pressed("ui_up")): - set_engine_force(engine_force) - else: - set_engine_force(0) - - if (Input.is_action_pressed("ui_down")): - set_brake(1) - else: - set_brake(0.0) - - if (steer_target < steer_angle): - steer_angle -= STEER_SPEED*delta - if (steer_target > steer_angle): - steer_angle = steer_target - elif (steer_target > steer_angle): - steer_angle += STEER_SPEED*delta - if (steer_target < steer_angle): - steer_angle = steer_target - - set_steering(steer_angle) - - -func _ready(): - set_fixed_process(true) |