initial commit
This commit is contained in:
20
scenes/Event.cs
Normal file
20
scenes/Event.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public class Event : Node
|
||||
{
|
||||
[Signal]
|
||||
delegate void GameStarted(string example);
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
var events = (Event) GetNode("/root/Event");
|
||||
events.Connect("GameStarted", this, "MyCallBack");
|
||||
|
||||
events.EmitSignal("GameStarted", " my extra string");
|
||||
}
|
||||
|
||||
public void MyCallBack(string example) {
|
||||
GD.Print("signal worked" + example);
|
||||
}
|
||||
}
|
66
scenes/Main.tscn
Normal file
66
scenes/Main.tscn
Normal file
@@ -0,0 +1,66 @@
|
||||
[gd_scene load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scenes/enemies/goomba/Goomba.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scenes/enemies/turtle/red/RedTurtle.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://scenes/enemies/turtle/blue/BlueTurtle.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://scenes/enemies/turtle/grey/GreyTurtle.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://scenes/enemies/plant/Plant.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://scenes/collectables/Bolt.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://scenes/collectables/Energy.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://scenes/block/MysteryBlock.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://scenes/block/MysteryBlockCave.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://scenes/checkpoint/Checkpoint.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://scenes/powerup/fire/FirePowerup.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://scenes/powerup/fire/InvinicibilityPowerup.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://scenes/enemies/spike_shell/SpikeShell.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://scenes/gear/Gear.tscn" type="PackedScene" id=15]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
|
||||
[node name="GameObjects" type="Node" parent="."]
|
||||
|
||||
[node name="Player" parent="GameObjects" instance=ExtResource( 1 )]
|
||||
position = Vector2( 256, 140 )
|
||||
|
||||
[node name="Goomba" parent="GameObjects" instance=ExtResource( 2 )]
|
||||
position = Vector2( 307, 141 )
|
||||
|
||||
[node name="BlueTurtle" parent="GameObjects" instance=ExtResource( 4 )]
|
||||
position = Vector2( 312, 179 )
|
||||
|
||||
[node name="RedTurtle" parent="GameObjects" instance=ExtResource( 3 )]
|
||||
position = Vector2( 308, 106 )
|
||||
|
||||
[node name="GreyTurtle" parent="GameObjects" instance=ExtResource( 5 )]
|
||||
position = Vector2( 364, 110 )
|
||||
|
||||
[node name="Plant" parent="GameObjects" instance=ExtResource( 6 )]
|
||||
position = Vector2( 256, 165 )
|
||||
|
||||
[node name="Bolt" parent="GameObjects" instance=ExtResource( 7 )]
|
||||
position = Vector2( 256, 108 )
|
||||
|
||||
[node name="Energy" parent="GameObjects" instance=ExtResource( 8 )]
|
||||
position = Vector2( 255, 82 )
|
||||
|
||||
[node name="MysteryBlock" parent="GameObjects" instance=ExtResource( 9 )]
|
||||
position = Vector2( 258, 205 )
|
||||
|
||||
[node name="MysteryBlockCave" parent="GameObjects" instance=ExtResource( 10 )]
|
||||
position = Vector2( 260, 252 )
|
||||
|
||||
[node name="Checkpoint" parent="GameObjects" instance=ExtResource( 11 )]
|
||||
position = Vector2( 307, 225 )
|
||||
|
||||
[node name="FirePowerup" parent="GameObjects" instance=ExtResource( 12 )]
|
||||
position = Vector2( 227, 141 )
|
||||
|
||||
[node name="InvinicibilityPowerup" parent="GameObjects" instance=ExtResource( 13 )]
|
||||
position = Vector2( 204, 141 )
|
||||
|
||||
[node name="SpikeShell" parent="GameObjects" instance=ExtResource( 14 )]
|
||||
position = Vector2( 361, 136 )
|
||||
|
||||
[node name="Gear" parent="GameObjects" instance=ExtResource( 15 )]
|
||||
position = Vector2( 211, 101 )
|
37
scenes/block/MysteryBlock.tscn
Normal file
37
scenes/block/MysteryBlock.tscn
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/block/block.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "opened",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "unopened",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 8, 8 )
|
||||
|
||||
[node name="MysteryBlock" type="StaticBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 3 )
|
||||
animation = "unopened"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 4 )
|
37
scenes/block/MysteryBlockCave.tscn
Normal file
37
scenes/block/MysteryBlockCave.tscn
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/block/cave_block.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "opened",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "unopened",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 8, 8 )
|
||||
|
||||
[node name="MysteryBlockCave" type="StaticBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 3 )
|
||||
animation = "unopened"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 4 )
|
60
scenes/checkpoint/Checkpoint.tscn
Normal file
60
scenes/checkpoint/Checkpoint.tscn
Normal file
@@ -0,0 +1,60 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://assets/checkpoint/checkpoint.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 32 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=7]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "activated",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "deactivated",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "reached",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=8]
|
||||
extents = Vector2( 5, 10.5 )
|
||||
|
||||
[node name="Checkpoint" type="Area2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 7 )
|
||||
animation = "deactivated"
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0, 5.5 )
|
||||
shape = SubResource( 8 )
|
50
scenes/collectables/Bolt.tscn
Normal file
50
scenes/collectables/Bolt.tscn
Normal file
@@ -0,0 +1,50 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://assets/collectable/bolt.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=7]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "spin",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=8]
|
||||
extents = Vector2( 5, 5 )
|
||||
|
||||
[node name="Bolt" type="Area2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 7 )
|
||||
animation = "spin"
|
||||
frame = 4
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 8 )
|
34
scenes/collectables/Energy.tscn
Normal file
34
scenes/collectables/Energy.tscn
Normal file
@@ -0,0 +1,34 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/collectable/energy.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "glow",
|
||||
"speed": 4.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 2.5, 6.5 )
|
||||
|
||||
[node name="Energy" type="Area2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 3 )
|
||||
animation = "glow"
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, -0.5 )
|
||||
shape = SubResource( 4 )
|
39
scenes/enemies/goomba/Goomba.tscn
Normal file
39
scenes/enemies/goomba/Goomba.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://assets/goomba/walking.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 19 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 19 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 19 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=5]
|
||||
extents = Vector2( 6.5, 7 )
|
||||
|
||||
[node name="Goomba" type="KinematicBody2D"]
|
||||
collision_layer = 4
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
animation = "walk"
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0.5, 2 )
|
||||
shape = SubResource( 5 )
|
35
scenes/enemies/plant/Plant.tscn
Normal file
35
scenes/enemies/plant/Plant.tscn
Normal file
@@ -0,0 +1,35 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/plant/plant.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "chomp",
|
||||
"speed": 4.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 6, 13 )
|
||||
|
||||
[node name="Plant" type="KinematicBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 3 )
|
||||
animation = "chomp"
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0, 3 )
|
||||
shape = SubResource( 4 )
|
39
scenes/enemies/spike_shell/SpikeShell.tscn
Normal file
39
scenes/enemies/spike_shell/SpikeShell.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://assets/spike_shell/walking.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=5]
|
||||
extents = Vector2( 9.5, 9.5 )
|
||||
|
||||
[node name="SpikeShell" type="KinematicBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
animation = "walk"
|
||||
frame = 2
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -1.5, 6.5 )
|
||||
shape = SubResource( 5 )
|
59
scenes/enemies/turtle/blue/BlueTurtle.tscn
Normal file
59
scenes/enemies/turtle/blue/BlueTurtle.tscn
Normal file
@@ -0,0 +1,59 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://assets/turtle/blue_walking.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/turtle/blue_shell.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "shell",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=5]
|
||||
extents = Vector2( 9.5, 8 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=7]
|
||||
extents = Vector2( 5.5, 6 )
|
||||
|
||||
[node name="BlueTurtle" type="KinematicBody2D"]
|
||||
collision_layer = 4
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
animation = "walk"
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="NormalCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 0 )
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="ShellCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 2 )
|
||||
shape = SubResource( 7 )
|
||||
disabled = true
|
78
scenes/enemies/turtle/grey/GreyTurtle.tscn
Normal file
78
scenes/enemies/turtle/grey/GreyTurtle.tscn
Normal file
@@ -0,0 +1,78 @@
|
||||
[gd_scene load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://assets/turtle/grey_walking.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/turtle/grey_breaking.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 32, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=10]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 64, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 96, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=12]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 128, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=13]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=14]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=15]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 8 ), SubResource( 9 ), SubResource( 10 ) ],
|
||||
"loop": true,
|
||||
"name": "break",
|
||||
"speed": 3.0
|
||||
}, {
|
||||
"frames": [ SubResource( 11 ), SubResource( 12 ) ],
|
||||
"loop": true,
|
||||
"name": "revive",
|
||||
"speed": 2.0
|
||||
}, {
|
||||
"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 15 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=5]
|
||||
extents = Vector2( 9.5, 8 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=7]
|
||||
extents = Vector2( 5.5, 6 )
|
||||
|
||||
[node name="GreyTurtle" type="KinematicBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
animation = "walk"
|
||||
playing = true
|
||||
|
||||
[node name="NormalCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 0 )
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="ShellCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 2 )
|
||||
shape = SubResource( 7 )
|
||||
disabled = true
|
57
scenes/enemies/turtle/red/RedTurtle.tscn
Normal file
57
scenes/enemies/turtle/red/RedTurtle.tscn
Normal file
@@ -0,0 +1,57 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://assets/turtle/red_walking.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/turtle/red_shell.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=10]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 32, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "shell",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 6.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=5]
|
||||
extents = Vector2( 9.5, 8 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=7]
|
||||
extents = Vector2( 5.5, 6 )
|
||||
|
||||
[node name="RedTurtle" type="KinematicBody2D"]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
animation = "walk"
|
||||
playing = true
|
||||
|
||||
[node name="NormalCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 0 )
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="ShellCollision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( -0.5, 2 )
|
||||
shape = SubResource( 7 )
|
||||
disabled = true
|
11
scenes/gear/Gear.cs
Normal file
11
scenes/gear/Gear.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public class Gear : Area2D
|
||||
{
|
||||
public override void _Process(float delta)
|
||||
{
|
||||
Sprite sprite = GetNode<Sprite>("Sprite");
|
||||
sprite.Rotate(Mathf.Deg2Rad(2));
|
||||
}
|
||||
}
|
17
scenes/gear/Gear.tscn
Normal file
17
scenes/gear/Gear.tscn
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/gear/gear.png" type="Texture" id=1]
|
||||
[ext_resource path="res://scenes/gear/Gear.cs" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 15.0333
|
||||
|
||||
[node name="Gear" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 1 )
|
147
scenes/player/Player.tscn
Normal file
147
scenes/player/Player.tscn
Normal file
@@ -0,0 +1,147 @@
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://assets/player/idle.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/player/death.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/player/jumping.png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/player/wall_slide.png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/player/enter_into_tube.png" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/player/swimming.png" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/player/walking.png" type="Texture" id=7]
|
||||
[ext_resource path="res://assets/player/surface_rising.png" type="Texture" id=8]
|
||||
[ext_resource path="res://assets/player/climbing.png" type="Texture" id=9]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=18]
|
||||
atlas = ExtResource( 9 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=19]
|
||||
atlas = ExtResource( 9 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=15]
|
||||
atlas = ExtResource( 8 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=16]
|
||||
atlas = ExtResource( 8 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=17]
|
||||
atlas = ExtResource( 8 )
|
||||
region = Rect2( 32, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 3 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
atlas = ExtResource( 6 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
atlas = ExtResource( 6 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
atlas = ExtResource( 5 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=10]
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=12]
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 32, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=13]
|
||||
atlas = ExtResource( 7 )
|
||||
region = Rect2( 48, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=14]
|
||||
atlas = ExtResource( 4 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 18 ), SubResource( 19 ) ],
|
||||
"loop": true,
|
||||
"name": "climb",
|
||||
"speed": 4.0
|
||||
}, {
|
||||
"frames": [ SubResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "dead",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 15 ), SubResource( 16 ), SubResource( 17 ) ],
|
||||
"loop": true,
|
||||
"name": "exit_swim",
|
||||
"speed": 6.0
|
||||
}, {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 2.0
|
||||
}, {
|
||||
"frames": [ SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "jump",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "swim",
|
||||
"speed": 4.0
|
||||
}, {
|
||||
"frames": [ SubResource( 9 ) ],
|
||||
"loop": true,
|
||||
"name": "tube",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 8.0
|
||||
}, {
|
||||
"frames": [ SubResource( 14 ) ],
|
||||
"loop": true,
|
||||
"name": "wall",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 6, 6.5 )
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
collision_mask = 0
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 3 )
|
||||
animation = "idle"
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0, 1.5 )
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
current = true
|
15
scenes/powerup/fire/FirePowerup.tscn
Normal file
15
scenes/powerup/fire/FirePowerup.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/powerup/fire.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 5, 6 )
|
||||
|
||||
[node name="FirePowerup" type="Area2D"]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 1 )
|
15
scenes/powerup/fire/InvinicibilityPowerup.tscn
Normal file
15
scenes/powerup/fire/InvinicibilityPowerup.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/powerup/invincibility.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 5, 6 )
|
||||
|
||||
[node name="InvinicibilityPowerup" type="Area2D"]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource( 1 )
|
Reference in New Issue
Block a user