add rust inc

This commit is contained in:
pennyrigate 2023-03-01 18:58:44 -05:00
parent ab992ae383
commit 2a9fcd17a1
13 changed files with 342 additions and 212 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2] [gd_scene load_steps=17 format=2]
[ext_resource path="res://autoloads/level_data.gd" type="Script" id=1] [ext_resource path="res://autoloads/level_data.gd" type="Script" id=1]
[ext_resource path="res://maps/map01.tscn" type="PackedScene" id=2] [ext_resource path="res://maps/map01.tscn" type="PackedScene" id=2]
@ -8,6 +8,7 @@
[ext_resource path="res://maps/mountain.tscn" type="PackedScene" id=6] [ext_resource path="res://maps/mountain.tscn" type="PackedScene" id=6]
[ext_resource path="res://maps/abyss.tscn" type="PackedScene" id=7] [ext_resource path="res://maps/abyss.tscn" type="PackedScene" id=7]
[ext_resource path="res://maps/boss/boss1_arena.tscn" type="PackedScene" id=8] [ext_resource path="res://maps/boss/boss1_arena.tscn" type="PackedScene" id=8]
[ext_resource path="res://maps/rust.tscn" type="PackedScene" id=9]
[sub_resource type="Resource" id=1] [sub_resource type="Resource" id=1]
resource_name = "Verdant Hills" resource_name = "Verdant Hills"
@ -57,6 +58,14 @@ shard_titles = [ "You", "Can", "(not)", "Breathe", "5 Rainbow Stars", "Collectio
save_id = "abyss" save_id = "abyss"
scene = ExtResource( 7 ) scene = ExtResource( 7 )
[sub_resource type="Resource" id=7]
resource_name = "Rust Inc."
script = ExtResource( 5 )
title = "Rust Inc."
shard_titles = [ "No breaks", "Long shift", "Low pay", "Can't sit", "5 Rainbow Stars", "Collection Bonus", "Time Bonus", "Life Bonus" ]
save_id = "rust"
scene = ExtResource( 9 )
[node name="LevelData" type="Node"] [node name="LevelData" type="Node"]
script = ExtResource( 1 ) script = ExtResource( 1 )
levels = [ SubResource( 1 ), SubResource( 2 ), SubResource( 4 ), SubResource( 6 ), SubResource( 3 ), SubResource( 5 ) ] levels = [ SubResource( 1 ), SubResource( 2 ), SubResource( 4 ), SubResource( 6 ), SubResource( 3 ), SubResource( 5 ), SubResource( 7 ) ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/robosnake.png-9628cd695b11d94f81ee466c12b59d7e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/enemy/robosnake.png"
dest_files=[ "res://.import/robosnake.png-9628cd695b11d94f81ee466c12b59d7e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/roboturret.png-e07ce7c3906f2fea34c536c816695e97.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/enemy/roboturret.png"
dest_files=[ "res://.import/roboturret.png-e07ce7c3906f2fea34c536c816695e97.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/roboturret_projectile.png-d7d81b85620cc134b26a04626029ce57.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/enemy/roboturret_projectile.png"
dest_files=[ "res://.import/roboturret_projectile.png-d7d81b85620cc134b26a04626029ce57.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -1,9 +1,11 @@
[gd_scene load_steps=5 format=2] [gd_scene load_steps=7 format=2]
[ext_resource path="res://maps/map.gd" type="Script" id=1] [ext_resource path="res://maps/map.gd" type="Script" id=1]
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=2] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=2]
[ext_resource path="res://graphics/backgrounds/rust.png" type="Texture" id=3] [ext_resource path="res://graphics/backgrounds/rust.png" type="Texture" id=3]
[ext_resource path="res://tilesets/t_rust.tres" type="TileSet" id=4] [ext_resource path="res://tilesets/t_rust.tres" type="TileSet" id=4]
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=5]
[ext_resource path="res://objects/enemy/robosnake.tscn" type="PackedScene" id=6]
[node name="Map" type="Node2D" groups=["map"]] [node name="Map" type="Node2D" groups=["map"]]
pause_mode = 1 pause_mode = 1
@ -17,9 +19,22 @@ layer = -64
[node name="Sprite" type="Sprite" parent="CanvasLayer"] [node name="Sprite" type="Sprite" parent="CanvasLayer"]
position = Vector2( 128, 96 ) position = Vector2( 128, 96 )
texture = ExtResource( 3 ) texture = ExtResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="TileMap" type="TileMap" parent="."] [node name="TileMap" type="TileMap" parent="."]
tile_set = ExtResource( 4 ) tile_set = ExtResource( 4 )
cell_size = Vector2( 8, 8 ) cell_size = Vector2( 8, 8 )
format = 1 format = 1
tile_data = PoolIntArray( 1245195, 0, 65537, 1245196, 0, 65537, 1245197, 0, 65537, 1245198, 0, 65537, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 2, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0 ) tile_data = PoolIntArray( 1245195, 0, 65537, 1245196, 0, 65537, 1245197, 0, 65537, 1245198, 0, 65537, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 2, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0 )
[node name="Player" parent="." instance=ExtResource( 5 )]
position = Vector2( 48, 152 )
[node name="Enemies" type="Node2D" parent="."]
[node name="RoboSnake" parent="Enemies" instance=ExtResource( 6 )]
position = Vector2( 232, 168 )
left_up_boundry = 4.0
right_down_boundry = 4.0

View file

@ -1,209 +0,0 @@
[gd_scene load_steps=29 format=2]
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1]
[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2]
[ext_resource path="res://tilesets/t_mountain.tres" type="TileSet" id=3]
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=4]
[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=5]
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=6]
[ext_resource path="res://graphics/backgrounds/canopy.png" type="Texture" id=7]
[ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=8]
[ext_resource path="res://objects/environment/rock/rock.tscn" type="PackedScene" id=9]
[ext_resource path="res://objects/enemy/slime.tscn" type="PackedScene" id=10]
[ext_resource path="res://maps/map.gd" type="Script" id=11]
[ext_resource path="res://objects/environment/turniwood/turning_platform.tscn" type="PackedScene" id=12]
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=13]
[ext_resource path="res://objects/environment/falling_block/falling_block.tscn" type="PackedScene" id=14]
[ext_resource path="res://objects/environment/moving_platform/moving_platform.tscn" type="PackedScene" id=15]
[ext_resource path="res://objects/respawn_point.tscn" type="PackedScene" id=16]
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=17]
[ext_resource path="res://objects/enemy/mine.tscn" type="PackedScene" id=18]
[ext_resource path="res://objects/enemy/explosion.tscn" type="PackedScene" id=19]
[ext_resource path="res://objects/enemy/tin.tscn" type="PackedScene" id=20]
[ext_resource path="res://graphics/enemy/sawblade.png" type="Texture" id=21]
[ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=22]
[ext_resource path="res://objects/enemy/laser_wall.tscn" type="PackedScene" id=23]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 20 )
[sub_resource type="ShaderMaterial" id=4]
shader = ExtResource( 17 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 21 )
region = Rect2( 0, 0, 12, 12 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 21 )
region = Rect2( 12, 0, 12, 12 )
[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 6 ), SubResource( 7 ) ],
"loop": true,
"name": "default",
"speed": 20.0
} ]
[node name="Map2" type="Node2D" groups=["map"]]
script = ExtResource( 11 )
[node name="Camera2D" parent="." instance=ExtResource( 6 )]
current = false
[node name="Sprite" type="Sprite" parent="Camera2D"]
position = Vector2( 128, 96 )
z_index = -50
texture = ExtResource( 7 )
__meta__ = {
"_edit_lock_": true
}
[node name="CanvasLayer" parent="." instance=ExtResource( 4 )]
[node name="Ground" type="TileMap" parent="."]
tile_set = ExtResource( 3 )
cell_size = Vector2( 8, 8 )
collision_layer = 9
format = 1
tile_data = PoolIntArray( 393234, 0, 65537, 393235, 0, 65537, 393240, 0, 65537, 393241, 0, 65537, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 983064, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1114125, 0, 0, 1114126, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1310736, 0, 0, 1310738, 0, 0, 1310739, 0, 0, 1310740, 0, 0, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507335, 0, 1, 1507336, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507352, 0, 1, 1507353, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1 )
[node name="Rock" parent="." instance=ExtResource( 9 )]
position = Vector2( 144, 152 )
[node name="Slime" parent="." instance=ExtResource( 10 )]
position = Vector2( 264, 168 )
[node name="Slime2" parent="." instance=ExtResource( 10 )]
position = Vector2( 264, 160 )
[node name="Slime2" parent="." instance=ExtResource( 10 )]
position = Vector2( 216, 168 )
[node name="Slime3" parent="." instance=ExtResource( 10 )]
position = Vector2( 216, 168 )
[node name="Slime4" parent="." instance=ExtResource( 10 )]
position = Vector2( 216, 168 )
[node name="Arrow" parent="." instance=ExtResource( 13 )]
position = Vector2( 104, 120 )
[node name="Player" parent="." instance=ExtResource( 1 )]
position = Vector2( 104, 110 )
[node name="Ladder3" parent="." instance=ExtResource( 8 )]
position = Vector2( 40, 136 )
scale = Vector2( 1, 5 )
[node name="Ladder" type="TileMap" parent="."]
tile_set = ExtResource( 2 )
cell_size = Vector2( 8, 8 )
collision_layer = 9
format = 1
tile_data = PoolIntArray( 1114117, 0, 196610, 1179653, 0, 196608, 1245189, 0, 196608, 1310725, 0, 196608, 1376261, 0, 196609 )
[node name="Death" type="TileMap" parent="."]
visible = false
tile_set = ExtResource( 5 )
cell_size = Vector2( 8, 8 )
format = 1
[node name="Turniwood5" parent="." instance=ExtResource( 12 )]
position = Vector2( 80, 120 )
[node name="Turniwood10" parent="." instance=ExtResource( 12 )]
position = Vector2( 184, 160 )
[node name="Turniwood6" parent="." instance=ExtResource( 12 )]
position = Vector2( 72, 112 )
delay = 0.5
[node name="Turniwood8" parent="." instance=ExtResource( 12 )]
position = Vector2( 64, 104 )
delay = 1.0
[node name="Turniwood7" parent="." instance=ExtResource( 12 )]
position = Vector2( 56, 96 )
delay = 1.5
[node name="Turniwood9" parent="." instance=ExtResource( 12 )]
position = Vector2( 48, 88 )
delay = 2.0
[node name="FallingBlock" parent="." instance=ExtResource( 14 )]
position = Vector2( 192, 112 )
[node name="MovingPlatform2" parent="." instance=ExtResource( 15 )]
position = Vector2( 176, 48 )
left_up_boundry = 2.0
right_down_boundry = 2.0
[node name="RespawnPoint" parent="." instance=ExtResource( 16 )]
position = Vector2( 88, 160 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="RespawnPoint"]
position = Vector2( 0, -4 )
shape = SubResource( 1 )
[node name="Mine" parent="." instance=ExtResource( 18 )]
position = Vector2( 232, 144 )
[node name="Explosion" parent="." instance=ExtResource( 19 )]
position = Vector2( 112, 40 )
[node name="Tin" parent="." instance=ExtResource( 20 )]
position = Vector2( 168, 96 )
up_boundary = 3.0
down_boundary = 3.0
[node name="Tin2" parent="." instance=ExtResource( 20 )]
position = Vector2( 32, 72 )
up_boundary = 3.0
down_boundary = 3.0
[node name="SawTest3" type="AnimatedSprite" parent="."]
material = SubResource( 4 )
position = Vector2( 120, 168 )
z_index = -3
frames = SubResource( 5 )
playing = true
[node name="SawTest4" type="AnimatedSprite" parent="."]
material = SubResource( 4 )
position = Vector2( 160, 168 )
z_index = -3
frames = SubResource( 5 )
frame = 1
playing = true
[node name="SawTest5" type="AnimatedSprite" parent="."]
material = SubResource( 4 )
position = Vector2( 56, 176 )
z_index = -3
frames = SubResource( 5 )
frame = 1
playing = true
[node name="RollingFiend" parent="." instance=ExtResource( 22 )]
position = Vector2( 48, 120 )
[node name="AnimatedSprite" parent="RollingFiend" index="0"]
visible = false
[node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"]
material = SubResource( 4 )
position = Vector2( 4, 4 )
z_index = -3
frames = SubResource( 5 )
playing = true
[node name="LaserWall" parent="." instance=ExtResource( 23 )]
position = Vector2( 152, 112 )
left_up_boundry = 1.0
right_down_boundry = 3.0
[editable path="RollingFiend"]

View file

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://objects/enemy/snake.tscn" type="PackedScene" id=1]
[node name="Snake" instance=ExtResource( 1 )]
[node name="AnimatedSprite" parent="." index="0"]
animation = "robo"
frame = 0

View file

@ -0,0 +1,35 @@
extends "res://objects/enemy/enemy.gd"
#Exports
export var shoot_time = 1.0
export var arrow_speed = 80.0
#Onready
onready var timer = $Timer
onready var anims = $AnimationPlayer
onready var shootpos = $ShootPos
onready var raycast = $RayCast2D
const ArrowProjectile = preload("res://objects/enemy/roboturret_proj.tscn")
func _physics_process(delta):
if raycast.is_colliding():
if sign(shootpos.position.x) == -1:
anims.play("turn right")
else:
anims.play("turn left")
func spawn_bullet():
var arrow = ArrowProjectile.instance()
if scale.x > 0:
arrow.global_position = global_position + shootpos.position
else:
arrow.global_position = global_position + shootpos.position
arrow.direction = sign(shootpos.position.x)
arrow.target_group = "player"
arrow.speed = arrow_speed
Game.get_map().add_child(arrow)
timer.start(shoot_time)
func _on_Timer_timeout():
if !anims.is_playing(): spawn_bullet()

View file

@ -0,0 +1,146 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://graphics/enemy/roboturret.png" type="Texture" id=2]
[ext_resource path="res://objects/enemy/roboturret.gd" type="Script" id=3]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 1 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("ShootPos:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( -9, 2 ) ]
}
[sub_resource type="Animation" id=3]
resource_name = "turn left"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 4, 3, 2, 1, 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("ShootPos:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Vector2( 9, 3 ), Vector2( -9, 3 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("RayCast2D:cast_to")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Vector2( -48, 0 ), Vector2( 48, 0 ) ]
}
[sub_resource type="Animation" id=4]
resource_name = "turn right"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3, 4 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("ShootPos:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Vector2( -9, 3 ), Vector2( 9, 3 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("RayCast2D:cast_to")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Vector2( 48, 0 ), Vector2( -48, 0 ) ]
}
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 4, 4 )
[node name="Roboturret" type="Node2D"]
script = ExtResource( 3 )
score_for_killing = 100
[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 1 )
position = Vector2( 3, 0 )
texture = ExtResource( 2 )
hframes = 5
region_rect = Rect2( 20, 0, 20, 16 )
[node name="ShootPos" type="Position2D" parent="."]
position = Vector2( -9, 2 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/RESET = SubResource( 2 )
"anims/turn left" = SubResource( 3 )
"anims/turn right" = SubResource( 4 )
[node name="Timer" type="Timer" parent="."]
autostart = true
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2( 3, 3 )
enabled = true
cast_to = Vector2( 45, 0 )
collision_mask = 8
collide_with_areas = true
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( 4, 4 )
shape = SubResource( 5 )
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]

View file

@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://objects/enemy/enemy_arrow.tscn" type="PackedScene" id=1]
[ext_resource path="res://graphics/enemy/roboturret_projectile.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 3.5, 1 )
[node name="BulletBall" instance=ExtResource( 1 )]
[node name="Sprite" parent="." index="0"]
texture = ExtResource( 2 )
[node name="DustParticles" parent="." index="1"]
position = Vector2( -2, 0 )
amount = 8
[node name="CollisionShape2D" parent="Hitbox" index="0"]
position = Vector2( -0.5, 0 )
shape = SubResource( 1 )