added the scrump
This commit is contained in:
parent
e5151c4a28
commit
5d7a5a1d29
9 changed files with 70 additions and 58 deletions
BIN
graphics/enemy/boss/scrump.png
Normal file
BIN
graphics/enemy/boss/scrump.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
35
graphics/enemy/boss/scrump.png.import
Normal file
35
graphics/enemy/boss/scrump.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/scrump.png-20a0f13e9fd578f74222e8fcfeadea9c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/enemy/boss/scrump.png"
|
||||||
|
dest_files=[ "res://.import/scrump.png-20a0f13e9fd578f74222e8fcfeadea9c.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
|
|
@ -34,9 +34,9 @@ save_id = "mountain"
|
||||||
scene = ExtResource( 6 )
|
scene = ExtResource( 6 )
|
||||||
|
|
||||||
[sub_resource type="Resource" id=6]
|
[sub_resource type="Resource" id=6]
|
||||||
resource_name = "VS Boss1"
|
resource_name = "VS The Scrump"
|
||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
title = "VS Boss1"
|
title = "VS The Scrump"
|
||||||
shard_titles = [ "-w-", "owo", "uwu", "o3o", "5 Rainbow Stars", "Collection Bonus", "Time Bonus", "Life Bonus" ]
|
shard_titles = [ "-w-", "owo", "uwu", "o3o", "5 Rainbow Stars", "Collection Bonus", "Time Bonus", "Life Bonus" ]
|
||||||
save_id = "Boss1"
|
save_id = "Boss1"
|
||||||
scene = ExtResource( 8 )
|
scene = ExtResource( 8 )
|
||||||
|
|
|
@ -40,7 +40,7 @@ __meta__ = {
|
||||||
tile_set = ExtResource( 5 )
|
tile_set = ExtResource( 5 )
|
||||||
cell_size = Vector2( 8, 8 )
|
cell_size = Vector2( 8, 8 )
|
||||||
format = 1
|
format = 1
|
||||||
tile_data = PoolIntArray( 851972, 0, 65536, 851973, 0, 65538, 851974, 0, 65538, 1114122, 0, 65536, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65538, 1310723, 0, 65536, 1310724, 0, 65537, 1310725, 0, 65537, 1310726, 0, 65537, 1310727, 0, 65537, 1310728, 0, 65537, 1310729, 0, 65537, 1310730, 0, 65537, 1310731, 0, 65537, 1310732, 0, 65537, 1310733, 0, 65537, 1310734, 0, 65537, 1310735, 0, 65537, 1310736, 0, 65537, 1310737, 0, 65537, 1310738, 0, 65537, 1310739, 0, 65537, 1310740, 0, 65538 )
|
tile_data = PoolIntArray( 720907, 0, 65536, 720908, 0, 65537, 720909, 0, 65538, 851972, 0, 65536, 851973, 0, 65538, 851974, 0, 65538, 1114122, 0, 65536, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65538, 1310723, 0, 65536, 1310724, 0, 65537, 1310725, 0, 65537, 1310726, 0, 65537, 1310727, 0, 65537, 1310728, 0, 65537, 1310729, 0, 65537, 1310730, 0, 65537, 1310731, 0, 65537, 1310732, 0, 65537, 1310733, 0, 65537, 1310734, 0, 65537, 1310735, 0, 65537, 1310736, 0, 65537, 1310737, 0, 65537, 1310738, 0, 65537, 1310739, 0, 65537, 1310740, 0, 65538 )
|
||||||
|
|
||||||
[node name="Ladder" type="TileMap" parent="."]
|
[node name="Ladder" type="TileMap" parent="."]
|
||||||
tile_set = ExtResource( 5 )
|
tile_set = ExtResource( 5 )
|
||||||
|
@ -60,15 +60,6 @@ arrow_spawns = [ Vector2( 92, 128 ), Vector2( 40, 96 ), Vector2( 96, 80 ) ]
|
||||||
[node name="TurningPlatform" parent="." instance=ExtResource( 9 )]
|
[node name="TurningPlatform" parent="." instance=ExtResource( 9 )]
|
||||||
position = Vector2( 72, 144 )
|
position = Vector2( 72, 144 )
|
||||||
|
|
||||||
[node name="TurningPlatform3" parent="." instance=ExtResource( 9 )]
|
|
||||||
position = Vector2( 88, 88 )
|
|
||||||
|
|
||||||
[node name="TurningPlatform4" parent="." instance=ExtResource( 9 )]
|
|
||||||
position = Vector2( 96, 88 )
|
|
||||||
|
|
||||||
[node name="TurningPlatform5" parent="." instance=ExtResource( 9 )]
|
|
||||||
position = Vector2( 104, 88 )
|
|
||||||
|
|
||||||
[node name="TurningPlatform2" parent="." instance=ExtResource( 9 )]
|
[node name="TurningPlatform2" parent="." instance=ExtResource( 9 )]
|
||||||
position = Vector2( 112, 144 )
|
position = Vector2( 112, 144 )
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,11 @@ var hp = 3
|
||||||
var arrow_speed = 80
|
var arrow_speed = 80
|
||||||
export var phase2_speed = 100
|
export var phase2_speed = 100
|
||||||
export var phase3_speed = 150
|
export var phase3_speed = 150
|
||||||
const ArrowProjectile = preload("res://objects/player/arrow_projectile.tscn")
|
const projectile = preload("res://objects/enemy/boss/boss1_projectile.tscn")
|
||||||
const arrow_pickup = preload("res://objects/collectibles/arrow.tscn")
|
const arrow_pickup = preload("res://objects/collectibles/arrow.tscn")
|
||||||
onready var shoot_timer = $ShootTimer
|
onready var shoot_timer = $ShootTimer
|
||||||
|
onready var shootpoint = $Position2D
|
||||||
|
onready var map = get_owner()
|
||||||
var shoot_time = Vector2(0.4,0.7)
|
var shoot_time = Vector2(0.4,0.7)
|
||||||
export var arrow_spawns = [Vector2(0,0),Vector2(0,0),Vector2(0,0)]
|
export var arrow_spawns = [Vector2(0,0),Vector2(0,0),Vector2(0,0)]
|
||||||
|
|
||||||
|
@ -16,16 +18,7 @@ func _ready():
|
||||||
seed(hash("HEROMARK2"))
|
seed(hash("HEROMARK2"))
|
||||||
|
|
||||||
func shoot():
|
func shoot():
|
||||||
var arrow = ArrowProjectile.instance()
|
Game.instance_node(projectile,global_position.x + shootpoint.position.x,stepify(global_position.y + shootpoint.position.y,8),map)
|
||||||
arrow.global_position = Vector2(
|
|
||||||
global_position.x + $Position2D.position.x,
|
|
||||||
stepify(global_position.y + $Position2D.position.y,8)
|
|
||||||
)
|
|
||||||
arrow.direction = -1
|
|
||||||
arrow.breaks_on_wall = false
|
|
||||||
arrow.target_group = "player"
|
|
||||||
arrow.speed = arrow_speed
|
|
||||||
get_owner().add_child(arrow)
|
|
||||||
|
|
||||||
func _on_ShootTimer_timeout():
|
func _on_ShootTimer_timeout():
|
||||||
shoot_timer.start(rand_range(shoot_time.x,shoot_time.y))
|
shoot_timer.start(rand_range(shoot_time.x,shoot_time.y))
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://graphics/enemy/boss/scrump.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://objects/enemy/boss/boss1.gd" type="Script" id=2]
|
[ext_resource path="res://objects/enemy/boss/boss1.gd" type="Script" id=2]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 12, 8 )
|
extents = Vector2( 5.5, 9.5 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
extents = Vector2( 16, 12 )
|
extents = Vector2( 20, 27 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=3]
|
|
||||||
extents = Vector2( 16, 4 )
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=4]
|
|
||||||
extents = Vector2( 8, 8 )
|
|
||||||
|
|
||||||
[node name="Boss1" type="Node2D"]
|
[node name="Boss1" type="Node2D"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
@ -20,6 +15,7 @@ move_direction = 1
|
||||||
flip_sprite = false
|
flip_sprite = false
|
||||||
|
|
||||||
[node name="Sprite" type="ColorRect" parent="."]
|
[node name="Sprite" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
margin_left = 8.0
|
margin_left = 8.0
|
||||||
margin_right = 40.0
|
margin_right = 40.0
|
||||||
margin_bottom = 40.0
|
margin_bottom = 40.0
|
||||||
|
@ -55,36 +51,32 @@ color = Color( 0.27451, 0.796078, 0.756863, 1 )
|
||||||
[node name="WeakSpot" type="Area2D" parent="." groups=["boss_weakspot", "enemy_hitbox"]]
|
[node name="WeakSpot" type="Area2D" parent="." groups=["boss_weakspot", "enemy_hitbox"]]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="WeakSpot"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="WeakSpot"]
|
||||||
position = Vector2( 12, 16 )
|
position = Vector2( 5.5, 14.5 )
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="Hitbox" type="Area2D" parent="." groups=["blocks_arrow", "enemy_hitbox"]]
|
[node name="Hitbox" type="Area2D" parent="." groups=["blocks_arrow", "enemy_hitbox"]]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||||
position = Vector2( 24, 36 )
|
position = Vector2( 32, 32 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Hitbox"]
|
|
||||||
position = Vector2( 24, 4 )
|
|
||||||
shape = SubResource( 3 )
|
|
||||||
|
|
||||||
[node name="CollisionShape2D3" type="CollisionShape2D" parent="Hitbox"]
|
|
||||||
position = Vector2( 32, 16 )
|
|
||||||
shape = SubResource( 4 )
|
|
||||||
|
|
||||||
[node name="ShootTimer" type="Timer" parent="."]
|
[node name="ShootTimer" type="Timer" parent="."]
|
||||||
wait_time = 0.5
|
wait_time = 0.5
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = true
|
autostart = true
|
||||||
|
|
||||||
[node name="Position2D" type="Position2D" parent="."]
|
[node name="Position2D" type="Position2D" parent="."]
|
||||||
position = Vector2( 8, 32 )
|
position = Vector2( 14, 29 )
|
||||||
|
|
||||||
[node name="ArrowSpawnTimer" type="Timer" parent="."]
|
[node name="ArrowSpawnTimer" type="Timer" parent="."]
|
||||||
wait_time = 5.0
|
wait_time = 5.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = true
|
autostart = true
|
||||||
|
|
||||||
|
[node name="Sprite2" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 26, 27 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||||
[connection signal="timeout" from="ShootTimer" to="." method="_on_ShootTimer_timeout"]
|
[connection signal="timeout" from="ShootTimer" to="." method="_on_ShootTimer_timeout"]
|
||||||
[connection signal="timeout" from="ArrowSpawnTimer" to="." method="_on_ArrowSpawnTimer_timeout"]
|
[connection signal="timeout" from="ArrowSpawnTimer" to="." method="_on_ArrowSpawnTimer_timeout"]
|
||||||
|
|
5
objects/enemy/boss/boss1_projectile.gd
Normal file
5
objects/enemy/boss/boss1_projectile.gd
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
extends "res://objects/enemy/enemy.gd"
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
position.x -= 80 * delta
|
11
objects/enemy/boss/boss1_projectile.tscn
Normal file
11
objects/enemy/boss/boss1_projectile.tscn
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://objects/enemy/boss/boss1_projectile.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="Boss1Projectile" type="Node2D"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
margin_right = 8.0
|
||||||
|
margin_bottom = 8.0
|
||||||
|
color = Color( 1, 0, 0, 1 )
|
|
@ -1,15 +0,0 @@
|
||||||
extends "res://objects/enemy/enemy.gd"
|
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
Loading…
Add table
Add a link
Reference in a new issue