Initial commit

This commit is contained in:
Oleksiy
2021-07-27 22:23:57 +03:00
commit 6cf84a1951
208 changed files with 4053 additions and 0 deletions

12
Objects/Armchair 1.tscn Normal file
View File

@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Assets/armchair.png" type="Texture" id=1]
[node name="Armchair 1" type="StaticBody2D"]
position = Vector2( 256, 81 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( -13.5783, -10.1799, -13.4995, -16.4007, 10.3602, -16.4795, 10.3602, -10.4949, 15.4787, -10.1011, 16.0299, 14.7823, -18.5392, 14.4673, -18.303, -10.4949 )

30
Objects/Lamp.tscn Normal file
View File

@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/lamp.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 6.67245
[sub_resource type="CircleShape2D" id=2]
radius = 11.689
[node name="Lamp" type="KinematicBody2D"]
position = Vector2( 284, 71 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 1.38898, 0.0496063 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 1.41422, 0.176773 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

30
Objects/Piano chair.tscn Normal file
View File

@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/piano chair.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 5.52256
[sub_resource type="CircleShape2D" id=2]
radius = 9.40768
[node name="Piano chair" type="KinematicBody2D"]
position = Vector2( 200, 27 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.176976, 1.00287 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.265152, 1.23744 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

30
Objects/Small Table.tscn Normal file
View File

@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/smalltable.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 11.9863, 7.80658 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 16.5, 13.25 )
[node name="Small Table" type="KinematicBody2D"]
position = Vector2( 254, 113 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0.667419, 0 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 0.75, 0 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

32
Objects/Yoga ball.tscn Normal file
View File

@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/yoga_ball.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 11.3264
[sub_resource type="CircleShape2D" id=2]
radius = 15.1318
[node name="Yoga ball" type="KinematicBody2D"]
position = Vector2( 151, 19 )
collision_layer = 8
collision_mask = 3
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.393726, -1.10243 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.353958, -1.17984 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

29
Objects/chair.tscn Normal file
View File

@ -0,0 +1,29 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Objects/movable.gd" type="Script" id=1]
[ext_resource path="res://Assets/chair.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 15.9218, 14.1346 )
[node name="chair" type="KinematicBody2D"]
position = Vector2( 35, 48 )
script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2( 0.278333, -0.280581 )
scale = Vector2( 0.955667, 0.940837 )
polygon = PoolVector2Array( -12.2894, -11.1353, -6.98127, -11.2404, -6.98127, -8.3498, 6.05262, -8.50747, 6.10518, -11.5032, 12.1491, -11.2929, 12.0966, 5.84032, 8.25997, 5.84032, 8.41764, 10.7806, -9.03096, 10.7806, -9.03096, 5.47243, -12.9727, 5.47243, -13.0252, -11.4506 )
[node name="Area2D" type="Area2D" parent="."]
position = Vector2( -35, -48 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 35.1687, 47.7688 )
shape = SubResource( 1 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

26
Objects/chair2.tscn Normal file
View File

@ -0,0 +1,26 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Assets/chair2.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[node name="chair2" type="KinematicBody2D"]
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
position = Vector2( 261.102, 34.3767 )
texture = ExtResource( 1 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2( 261.285, 34.2019 )
scale = Vector2( 0.944882, 0.918141 )
polygon = PoolVector2Array( -8.38025, -5.42854, 9.3374, -5.31042, 9.29803, 0.989185, 6.77817, 4.57209, 3.94336, 6.26511, -2.8681, 6.50134, -6.09665, 4.33585, -8.38025, 0.595459 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Area2D"]
position = Vector2( -70.3821, -10.5543 )
scale = Vector2( 1.27115, 1.31121 )
polygon = PoolVector2Array( 251.5, 27.6875, 271.562, 27.625, 271.688, 35.9375, 267.75, 41.3125, 259.75, 42.8125, 254.875, 41.25, 251.375, 36.125 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

36
Objects/movable.gd Normal file
View File

@ -0,0 +1,36 @@
extends KinematicBody2D
var input_vector = Vector2.ZERO
#onready var pushing = get_node("/root/Level/Player").pushing
export var MAX_SPEED = 100
var movement = Vector2.ZERO
onready var sprite = $sprite
var movable = false
func _on_player_entered(body):
if (body.name == "Player"):
movable = true
func _on_player_exited(body):
if (body.name == "Player"):
#yield(get_tree().create_timer(.1), "timeout")
sprite.modulate = Color(1,1,1)
movable = false
func _physics_process(_delta):
if (Input.get_action_strength("Action")>0 and movable):
sprite.modulate = Color(.3,.7,.1)
input_vector.x = Input.get_action_strength("Right") - Input.get_action_strength("Left")
input_vector.y = Input.get_action_strength("Down") - Input.get_action_strength("Up")
input_vector = input_vector.normalized()
movement.x = input_vector.x * MAX_SPEED #* delta
movement.y = input_vector.y * MAX_SPEED #* delta
movement = move_and_slide(movement)
if (Input.get_action_strength("Action")==0 and movable):
sprite.modulate = Color(.6,1,.7)

36
Objects/movable1.gd Normal file
View File

@ -0,0 +1,36 @@
extends KinematicBody2D
var input_vector = Vector2.ZERO
export var MAX_SPEED = 300
var movement = Vector2.ZERO
onready var sprite = $sprite
var movable = false
func _ready():
print("ping")
func _on_player_entered(body):
if (body.name == "Player"):
movable = true
func _on_player_exited(body):
if (body.name == "Player"):
#yield(get_tree().create_timer(.1), "timeout")
sprite.modulate = Color(1,1,1)
movable = false
func _physics_process(_delta):
if (Input.get_action_strength("Action")>0 and movable):
sprite.modulate = Color(.3,.7,.1)
input_vector.x = Input.get_action_strength("Right") - Input.get_action_strength("Left")
input_vector.y = Input.get_action_strength("Down") - Input.get_action_strength("Up")
input_vector = input_vector.normalized()
movement.x = input_vector.x * MAX_SPEED #* delta
movement.y = input_vector.y * MAX_SPEED #* delta
movement = move_and_slide(movement)
print(movable)
if (Input.get_action_strength("Action")==0 and movable):
sprite.modulate = Color(.6,1,.7)

31
Objects/plant 1.tscn Normal file
View File

@ -0,0 +1,31 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/plant1.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 6.4881
[sub_resource type="CircleShape2D" id=2]
radius = 11.1287
[node name="plant 1" type="KinematicBody2D"]
position = Vector2( 304, 38 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
position = Vector2( -0.319458, 0.250311 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.420921, 0.140307 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.187256, 0.0936432 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

31
Objects/plant 2.tscn Normal file
View File

@ -0,0 +1,31 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/plant2.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 6.4881
[sub_resource type="CircleShape2D" id=2]
radius = 10.1484
[node name="plant 2" type="KinematicBody2D"]
position = Vector2( 137, 220 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
position = Vector2( -0.372955, 0.92511 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.140312, 0.859698 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.210236, 0.917328 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

32
Objects/trash.tscn Normal file
View File

@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Assets/trash.png" type="Texture" id=1]
[ext_resource path="res://Objects/movable.gd" type="Script" id=2]
[sub_resource type="CapsuleShape2D" id=1]
radius = 5.73628
height = 0.0
[sub_resource type="CircleShape2D" id=2]
radius = 10.7798
[node name="trash" type="KinematicBody2D"]
position = Vector2( 73.8597, 103.86 )
script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0.496063, -2.08347 )
rotation = 1.5708
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 0.667419, -2.2914 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]

30
Objects/vinyl.tscn Normal file
View File

@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Objects/movable.gd" type="Script" id=1]
[ext_resource path="res://Assets/player.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7.25537, 6.35794 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 11.4376, 9.81968 )
[node name="vinyl" type="KinematicBody2D"]
script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="."]
position = Vector2( 184.206, 95.528 )
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 185.133, 95.6064 )
shape = SubResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 185.418, 95.652 )
shape = SubResource( 2 )
[connection signal="body_entered" from="Area2D" to="." method="_on_player_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_player_exited"]