Initial commit

This commit is contained in:
2020-11-01 00:59:39 +03:00
commit 49560b2ac1
69 changed files with 1535 additions and 0 deletions

104
scenes/Authors.tscn Normal file
View File

@ -0,0 +1,104 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://fonts/pixel.tres" type="DynamicFont" id=1]
[ext_resource path="res://objects/animatedAuthorsText.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/authorsAnim.gd" type="Script" id=3]
[sub_resource type="Animation" id=1]
resource_name = "onLoad"
length = 5.0
tracks/0/type = "value"
tracks/0/path = NodePath("borderLeft:rect_size")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 600 ), Vector2( 250, 600 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("borderRight:rect_size")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 600 ), Vector2( 250, 600 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("borderRight:rect_position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 1024, 0 ), Vector2( 774, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("CanvasLayer/authorsText:rect_position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, -177 ), Vector2( 0, 650 ) ]
}
[node name="Authors" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="borderLeft" type="ColorRect" parent="."]
anchor_bottom = 1.0
color = Color( 0, 0, 0, 0.784314 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="borderRight" type="ColorRect" parent="."]
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 0.784314 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="anim" type="AnimationPlayer" parent="."]
anims/onLoad = SubResource( 1 )
[node name="animatedAuthorsText" parent="." instance=ExtResource( 2 )]
margin_left = 839.099
margin_top = 437.926
margin_right = 839.099
margin_bottom = 437.926
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = 3
[node name="authorsText" type="Label" parent="CanvasLayer"]
anchor_right = 1.0
margin_top = -177.0
margin_bottom = -157.0
custom_fonts/font = ExtResource( 1 )
text = "<--- информация об авторах --->"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

165
scenes/MainMenu.tscn Normal file
View File

@ -0,0 +1,165 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://sprites/trashcan.png" type="Texture" id=1]
[ext_resource path="res://objects/sun.tscn" type="PackedScene" id=2]
[ext_resource path="res://fonts/pixel.tres" type="DynamicFont" id=3]
[ext_resource path="res://scripts/exitBtn.gd" type="Script" id=4]
[ext_resource path="res://scripts/authorsBtn.gd" type="Script" id=5]
[ext_resource path="res://scripts/playBtn.gd" type="Script" id=6]
[ext_resource path="res://objects/dog.tscn" type="PackedScene" id=7]
[ext_resource path="res://scripts/fallingTrashcans.gd" type="Script" id=8]
[ext_resource path="res://scripts/mainMenuLoadout.gd" type="Script" id=9]
[sub_resource type="CanvasItemMaterial" id=1]
[sub_resource type="Curve" id=2]
min_value = -360.0
max_value = 360.0
_data = [ Vector2( 0, 360 ), 0.0, 0.0, 0, 0, Vector2( 1, -360 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=3]
curve = SubResource( 2 )
[sub_resource type="ParticlesMaterial" id=4]
render_priority = 1
emission_shape = 2
emission_box_extents = Vector3( 600, 1, 1 )
flag_disable_z = true
gravity = Vector3( 0, 100, 0 )
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel_random = 1.0
angle = 25.0
angle_random = 1.0
angle_curve = SubResource( 3 )
scale = 0.5
scale_random = 1.0
[node name="MainMenu" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 9 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="background" type="Node" parent="."]
[node name="ColorRect5" type="ColorRect" parent="background"]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0.694118, 1, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect4" type="ColorRect" parent="background"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 331.0
color = Color( 0, 0, 0, 0.392157 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect3" type="ColorRect" parent="background"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 350.0
color = Color( 0, 0, 0, 0.588235 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect2" type="ColorRect" parent="background"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 368.0
color = Color( 0, 0, 0, 0.784314 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="dog" parent="background" instance=ExtResource( 7 )]
position = Vector2( 113, 60.9998 )
[node name="fallingTrashcans" type="Particles2D" parent="background"]
material = SubResource( 1 )
position = Vector2( 503.427, -72.738 )
z_index = 1
amount = 50
lifetime = 4.0
speed_scale = 1.5
randomness = 1.0
process_material = SubResource( 4 )
texture = ExtResource( 1 )
script = ExtResource( 8 )
[node name="CanvasLayer" type="CanvasLayer" parent="background"]
[node name="ColorRect" type="ColorRect" parent="background/CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 392.0
color = Color( 0, 0, 0, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="sun" parent="background" instance=ExtResource( 2 )]
position = Vector2( 1017.56, 12.2434 )
[node name="buttons" type="Node" parent="."]
[node name="CanvasLayer" type="CanvasLayer" parent="buttons"]
layer = 2
[node name="Play" type="Button" parent="buttons/CanvasLayer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -256.0
margin_top = 126.5
margin_right = 256.0
margin_bottom = 161.5
custom_fonts/font = ExtResource( 3 )
text = "Играть"
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Authors" type="Button" parent="buttons/CanvasLayer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -256.0
margin_top = 165.5
margin_right = 256.0
margin_bottom = 200.5
custom_fonts/font = ExtResource( 3 )
text = "Авторы"
script = ExtResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Exit" type="Button" parent="buttons/CanvasLayer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -256.0
margin_top = 204.5
margin_right = 256.0
margin_bottom = 239.5
custom_fonts/font = ExtResource( 3 )
text = "Выход"
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="sound" type="AudioStreamPlayer" parent="."]

262
scenes/Playground.tscn Normal file
View File

@ -0,0 +1,262 @@
[gd_scene load_steps=17 format=2]
[ext_resource path="res://sprites/trashcanBtnHover.png" type="Texture" id=1]
[ext_resource path="res://sprites/trashcanBtnPressed.png" type="Texture" id=2]
[ext_resource path="res://sprites/trash/plasticbottle.png" type="Texture" id=3]
[ext_resource path="res://sprites/trashcanBtnMain.png" type="Texture" id=4]
[ext_resource path="res://fonts/pixel.tres" type="DynamicFont" id=5]
[ext_resource path="res://scripts/onCardLoad.gd" type="Script" id=6]
[ext_resource path="res://scripts/trashcanBtns/plastic.gd" type="Script" id=7]
[ext_resource path="res://fonts/pixelBig.tres" type="DynamicFont" id=8]
[ext_resource path="res://scripts/scorePlayground.gd" type="Script" id=9]
[ext_resource path="res://scripts/trashcanBtns/paper.gd" type="Script" id=10]
[ext_resource path="res://scripts/trashcanBtns/glass.gd" type="Script" id=11]
[ext_resource path="res://scripts/trashcanBtns/other.gd" type="Script" id=12]
[sub_resource type="Animation" id=1]
resource_name = "onLoad"
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 512, -256 ), Vector2( 512, 200 ) ]
}
[sub_resource type="Animation" id=2]
resource_name = "onUnload"
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 512, 200 ), Vector2( 512, -256 ) ]
}
[sub_resource type="Animation" id=3]
resource_name = "lose"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath("false:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1.5, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 400, 650 ), Vector2( 400, 350 ), Vector2( 400, 350 ), Vector2( 400, 650 ) ]
}
[sub_resource type="Animation" id=4]
resource_name = "win"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath("true:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1.5, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 400, 650 ), Vector2( 400, 350 ), Vector2( 400, 350 ), Vector2( 400, 650 ) ]
}
[node name="Playground" type="Node2D"]
script = ExtResource( 6 )
[node name="background" type="ColorRect" parent="."]
margin_left = -59.0
margin_top = -54.0
margin_right = 1103.0
margin_bottom = 653.0
color = Color( 0, 0.576471, 1, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="sprite" type="Sprite" parent="."]
position = Vector2( 512, 200 )
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 3 )
[node name="anim" type="AnimationPlayer" parent="."]
anims/onLoad = SubResource( 1 )
anims/onUnload = SubResource( 2 )
[node name="winloseAnim" type="AnimationPlayer" parent="."]
anims/lose = SubResource( 3 )
anims/win = SubResource( 4 )
[node name="buttons" type="Node" parent="."]
[node name="plastic" type="TextureButton" parent="buttons"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -399.638
margin_top = -165.329
margin_right = -129.638
margin_bottom = 214.671
rect_scale = Vector2( 0.3, 0.3 )
texture_normal = ExtResource( 4 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 1 )
script = ExtResource( 7 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="glass" type="TextureButton" parent="buttons"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -172.638
margin_top = -165.329
margin_right = 97.3621
margin_bottom = 214.671
rect_scale = Vector2( 0.3, 0.3 )
texture_normal = ExtResource( 4 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 1 )
script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="paper" type="TextureButton" parent="buttons"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = 95.3621
margin_top = -165.329
margin_right = 365.362
margin_bottom = 214.671
rect_scale = Vector2( 0.3, 0.3 )
texture_normal = ExtResource( 4 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 1 )
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="other" type="TextureButton" parent="buttons"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = 313.362
margin_top = -165.329
margin_right = 583.362
margin_bottom = 214.671
rect_scale = Vector2( 0.3, 0.3 )
texture_normal = ExtResource( 4 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 1 )
script = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="plasticTxt" type="Label" parent="buttons"]
margin_left = 117.422
margin_top = 550.0
margin_right = 186.422
margin_bottom = 566.0
custom_fonts/font = ExtResource( 5 )
text = "Пластик"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="glassTxt" type="Label" parent="buttons"]
margin_left = 344.602
margin_top = 550.0
margin_right = 413.602
margin_bottom = 566.0
custom_fonts/font = ExtResource( 5 )
text = "Стекло"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="paperTxt" type="Label" parent="buttons"]
margin_left = 613.813
margin_top = 550.0
margin_right = 682.813
margin_bottom = 566.0
custom_fonts/font = ExtResource( 5 )
text = "Бумага"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="otherTxt" type="Label" parent="buttons"]
margin_left = 832.904
margin_top = 550.0
margin_right = 901.904
margin_bottom = 566.0
custom_fonts/font = ExtResource( 5 )
text = "Другое"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="true" type="Label" parent="."]
margin_left = 400.0
margin_top = 650.0
margin_right = 654.0
margin_bottom = 722.0
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 0, 1, 0, 1 )
text = "Верно!"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="false" type="Label" parent="."]
margin_left = 400.0
margin_top = 650.0
margin_right = 717.0
margin_bottom = 722.0
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 1, 0, 0, 1 )
text = "Ошибка!"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="score" type="Label" parent="."]
margin_left = 22.4396
margin_top = 15.4756
margin_right = 160.44
margin_bottom = 42.4756
custom_fonts/font = ExtResource( 5 )
text = "Ваш счет: "
script = ExtResource( 9 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="sound" type="AudioStreamPlayer" parent="."]

40
scenes/dog.tscn Normal file
View File

@ -0,0 +1,40 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://fonts/pixel.tres" type="DynamicFont" id=1]
[ext_resource path="res://scripts/dogLoadout.gd" type="Script" id=2]
[node name="bg" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="bg_color" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="text" type="Label" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -288.5
margin_top = -88.5
margin_right = 288.5
margin_bottom = 88.5
custom_fonts/font = ExtResource( 1 )
text = "В память о Умке - замечательной собаке,
жизнь которой была унесена столь рано.
Умка, мы тебя помним и любим.
Будь счастлива в лучшем мире...
-07.08.19-"
align = 1
[node name="sound" type="AudioStreamPlayer" parent="."]