Browse Source

added bathrooms

fix/wall
as4s4hetic 3 years ago
parent
commit
a10728c62a
  1. 283
      Resources/bathrooms.tres
  2. 29
      Scripts/CoverControl.gd
  3. 176
      Story/Ch1S2.tscn

283
Resources/bathrooms.tres

@ -0,0 +1,283 @@ @@ -0,0 +1,283 @@
[gd_resource type="TileSet" load_steps=13 format=2]
[ext_resource path="res://Tiles/blue-room.png" type="Texture" id=1]
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=2]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 60, 60, 0, 60, 0, 54, 60, 54 )
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 51, 54, 51, 0, 60, 0, 60, 60, 0, 60, 0, 54 )
[sub_resource type="ConvexPolygonShape2D" id=5]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 0, 0, 60, 0, 60, 42, 9, 42, 9, 60, 0, 60 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 0, 0, 60, 0, 60, 42, 0, 42 )
[sub_resource type="ConvexPolygonShape2D" id=8]
points = PoolVector2Array( 0, 0, 60, 0, 60, 60, 51, 60, 51, 42, 0, 42 )
[sub_resource type="ConvexPolygonShape2D" id=9]
points = PoolVector2Array( 9, 60, 0, 60, 0, 0, 9, 0 )
[sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 51, 0, 60, 0, 60, 60, 51, 60 )
[sub_resource type="ConvexPolygonShape2D" id=11]
points = PoolVector2Array( 9, 0, 9, 54, 60, 54, 60, 60, 0, 60, 0, 0 )
[resource]
0/name = "Blue-room"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 60, 60 )
0/tile_mode = 0
0/occluder_offset = Vector2( 90, 120 )
0/navigation_offset = Vector2( 90, 120 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = SubResource( 1 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 1 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
0/z_index = 0
1/name = "blue-room.png 1"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 60, 0, 60, 60 )
1/tile_mode = 0
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape = SubResource( 2 )
1/shape_one_way = false
1/shape_one_way_margin = 1.0
1/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 2 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
1/z_index = 0
2/name = "blue-room.png 2"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 120, 0, 60, 60 )
2/tile_mode = 0
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape = SubResource( 5 )
2/shape_one_way = false
2/shape_one_way_margin = 1.0
2/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
2/z_index = 0
3/name = "blue-room.png 3"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 0, 60, 60, 60 )
3/tile_mode = 0
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape = SubResource( 6 )
3/shape_one_way = false
3/shape_one_way_margin = 1.0
3/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 6 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
3/z_index = 0
4/name = "blue-room.png 4"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 60, 60, 60, 60 )
4/tile_mode = 0
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shape_offset = Vector2( 0, 0 )
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
4/shape = SubResource( 7 )
4/shape_one_way = false
4/shape_one_way_margin = 1.0
4/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
4/z_index = 0
5/name = "blue-room.png 5"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 120, 60, 60, 60 )
5/tile_mode = 0
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape = SubResource( 8 )
5/shape_one_way = false
5/shape_one_way_margin = 1.0
5/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 8 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
5/z_index = 0
6/name = "blue-room.png 6"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 0, 120, 60, 60 )
6/tile_mode = 0
6/occluder_offset = Vector2( 0, 0 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape = SubResource( 9 )
6/shape_one_way = false
6/shape_one_way_margin = 1.0
6/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 9 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
6/z_index = 0
7/name = "blue-room.png 7"
7/texture = ExtResource( 1 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 60, 120, 60, 60 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape_one_way = false
7/shape_one_way_margin = 0.0
7/shapes = [ ]
7/z_index = 0
8/name = "blue-room.png 8"
8/texture = ExtResource( 1 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 120, 120, 60, 60 )
8/tile_mode = 0
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape = SubResource( 10 )
8/shape_one_way = false
8/shape_one_way_margin = 1.0
8/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 10 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
8/z_index = 0
9/name = "blue-room.png 9"
9/texture = ExtResource( 1 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 0, 180, 60, 60 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape = SubResource( 11 )
9/shape_one_way = false
9/shape_one_way_margin = 1.0
9/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 11 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
9/z_index = 0
10/name = "blue-room.png 10"
10/texture = ExtResource( 1 )
10/tex_offset = Vector2( 0, 0 )
10/modulate = Color( 1, 1, 1, 1 )
10/region = Rect2( 60, 180, 60, 60 )
10/tile_mode = 0
10/occluder_offset = Vector2( 0, 0 )
10/navigation_offset = Vector2( 0, 0 )
10/shape_offset = Vector2( 0, 0 )
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
10/shape = SubResource( 3 )
10/shape_one_way = false
10/shape_one_way_margin = 1.0
10/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
10/z_index = 0
11/name = "blue-room.png 11"
11/texture = ExtResource( 1 )
11/tex_offset = Vector2( 0, 0 )
11/modulate = Color( 1, 1, 1, 1 )
11/region = Rect2( 120, 180, 60, 60 )
11/tile_mode = 0
11/occluder_offset = Vector2( 0, 0 )
11/navigation_offset = Vector2( 0, 0 )
11/shape_offset = Vector2( 0, 0 )
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
11/shape = SubResource( 4 )
11/shape_one_way = false
11/shape_one_way_margin = 1.0
11/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
11/z_index = 0

29
Scripts/CoverControl.gd

@ -1,11 +1,17 @@ @@ -1,11 +1,17 @@
extends Node2D
onready var player = get_node("../Player")
onready var covers = get_node("../Covers")
onready var furniture = get_node("../Furniture")
onready var furniture = get_node("../Rooms")
# Declare member variables here. Examples:
var areamap = {'living':[0], 'bedtop':[1,2], 'bedtopmid':[2,3], 'bedbotmid':[3,4], 'bedbot':[4,5]}
var areamap = {'living':[0],
'bedtop':[1,2],
'bedtopmid':[2,3],
'bedbotmid':[3,4],
'bedbot':[4,5],
'bathtop':[6],
'bathbot':[7]}
func hide_cover(xs):
for x in xs:
@ -87,3 +93,22 @@ func _on_BedBot_body_exited(body): @@ -87,3 +93,22 @@ func _on_BedBot_body_exited(body):
show_cover(areamap['bedbot'])
furniture.get_node("BedBot").hide()
func _on_BathTop_body_entered(body):
if body == player:
hide_cover(areamap['bathtop'])
func _on_BathTop_body_exited(body):
if body == player:
show_cover(areamap['bathtop'])
func _on_BathBot_body_entered(body):
if body == player:
hide_cover(areamap['bathbot'])
func _on_BathBot_body_exited(body):
if body == player:
show_cover(areamap['bathbot'])

176
Story/Ch1S2.tscn

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save