forked from team-sg/hero-mark-2
more easy mode stuff
This commit is contained in:
parent
82f2ebfc12
commit
fd444d505c
6 changed files with 48 additions and 44 deletions
|
@ -10,7 +10,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]
|
[ext_resource path="res://maps/rust.tscn" type="PackedScene" id=9]
|
||||||
[ext_resource path="res://maps/station.tscn" type="PackedScene" id=10]
|
[ext_resource path="res://maps/station.tscn" type="PackedScene" id=10]
|
||||||
[ext_resource path="res://maps/horror.tscn" type="PackedScene" id=11]
|
[ext_resource path="res://maps/graveyard.tscn" type="PackedScene" id=11]
|
||||||
|
|
||||||
[sub_resource type="Resource" id=1]
|
[sub_resource type="Resource" id=1]
|
||||||
resource_name = "Verdant Hills"
|
resource_name = "Verdant Hills"
|
||||||
|
@ -53,11 +53,11 @@ save_id = "cave"
|
||||||
scene = ExtResource( 4 )
|
scene = ExtResource( 4 )
|
||||||
|
|
||||||
[sub_resource type="Resource" id=9]
|
[sub_resource type="Resource" id=9]
|
||||||
resource_name = "Hell"
|
resource_name = "Graveyard"
|
||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
title = "Hell"
|
title = "Graveyard"
|
||||||
shard_titles = [ "All", "Dogs", "Go to ", "Hell", "5 Rainbow Stars", "Collection Bonus", "Time Bonus", "Life Bonus" ]
|
shard_titles = [ "All", "Dogs", "Go to ", "Hell", "5 Rainbow Stars", "Collection Bonus", "Time Bonus", "Life Bonus" ]
|
||||||
save_id = "horror"
|
save_id = "graveyard"
|
||||||
scene = ExtResource( 11 )
|
scene = ExtResource( 11 )
|
||||||
|
|
||||||
[sub_resource type="Resource" id=5]
|
[sub_resource type="Resource" id=5]
|
||||||
|
|
31
maps/graveyard.tscn
Normal file
31
maps/graveyard.tscn
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://maps/map.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://graphics/backgrounds/factory.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://tilesets/t_horror.tres" type="TileSet" id=4]
|
||||||
|
[ext_resource path="res://objects/enemy/artificial_soul.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[node name="Map" type="Node2D" groups=["map"]]
|
||||||
|
pause_mode = 1
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
lore_entries = [ ]
|
||||||
|
|
||||||
|
[node name="Background" type="CanvasLayer" parent="."]
|
||||||
|
layer = -1
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="Background"]
|
||||||
|
position = Vector2( 128, 96 )
|
||||||
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="Ghost" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 128, 128 )
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = ExtResource( 4 )
|
||||||
|
cell_size = Vector2( 8, 8 )
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 1179671, 3, 1, 1179672, 3, 1, 1245208, 3, 1, 1310744, 3, 1, 1376262, 2, 0, 1376264, 2, 65536, 1376265, 2, 65536, 1376266, 2, 65536, 1376268, 2, 65539, 1376270, 2, 65536, 1376271, 2, 65536, 1376272, 3, 1, 1376273, 3, 1, 1376274, 3, 1, 1376275, 3, 1, 1376276, 3, 1, 1376277, 3, 1, 1376278, 3, 1, 1376279, 3, 1, 1376280, 3, 1, 1376281, 2, 65537, 1376283, 2, 65536, 1376284, 2, 65536, 1376285, 2, 65536, 1376286, 2, 65536, 1376287, 2, 65536, 1507326, 1, 1, 1507327, 1, 2, 1441792, 1, 2, 1441793, 1, 2, 1441794, 1, 2, 1441795, 1, 2, 1441796, 1, 2, 1441797, 1, 2, 1441798, 1, 2, 1441799, 1, 2, 1441800, 1, 2, 1441801, 1, 2, 1441802, 1, 2, 1441803, 1, 2, 1441804, 1, 2, 1441805, 1, 2, 1441806, 1, 2, 1441807, 1, 2, 1441808, 1, 2, 1441809, 1, 2, 1441810, 1, 2, 1441811, 1, 2, 1441812, 1, 2, 1441813, 1, 2, 1441814, 1, 2, 1441815, 1, 2, 1441816, 1, 2, 1441817, 1, 2, 1441818, 1, 2, 1441819, 1, 2, 1441820, 1, 2, 1441821, 1, 2, 1441822, 1, 2, 1441823, 1, 2, 1441824, 1, 2, 1441825, 1, 2, 1441826, 1, 3, 1572862, 1, 131073, 1572863, 1, 65538, 1507328, 1, 65538, 1507329, 1, 65538, 1507330, 1, 65538, 1507331, 1, 65538, 1507332, 1, 65538, 1507333, 1, 65538, 1507334, 1, 65538, 1507335, 1, 65538, 1507336, 1, 65538, 1507337, 1, 65538, 1507338, 1, 65538, 1507339, 1, 65538, 1507340, 1, 65538, 1507341, 1, 65538, 1507342, 1, 65538, 1507343, 1, 65538, 1507344, 1, 65538, 1507345, 1, 65538, 1507346, 1, 65538, 1507347, 1, 65538, 1507348, 1, 65538, 1507349, 1, 65538, 1507350, 1, 65538, 1507351, 1, 65538, 1507352, 1, 65538, 1507353, 1, 65538, 1507354, 1, 65538, 1507355, 1, 65538, 1507356, 1, 65538, 1507357, 1, 65538, 1507358, 1, 65538, 1507359, 1, 65538, 1507360, 1, 65538, 1507361, 1, 131074, 1507362, 1, 131075, 1638399, 1, 131073, 1572864, 1, 131074, 1572865, 1, 131074, 1572866, 1, 131074, 1572867, 1, 131074, 1572868, 1, 131074, 1572869, 1, 131074, 1572870, 1, 131074, 1572871, 1, 131074, 1572872, 1, 131074, 1572873, 1, 131074, 1572874, 1, 131074, 1572875, 1, 131074, 1572876, 1, 131074, 1572877, 1, 131074, 1572878, 1, 131074, 1572879, 1, 131074, 1572880, 1, 131074, 1572881, 1, 131074, 1572882, 1, 131074, 1572883, 1, 131074, 1572884, 1, 131074, 1572885, 1, 131074, 1572886, 1, 131074, 1572887, 1, 131074, 1572888, 1, 131074, 1572889, 1, 131074, 1572890, 1, 131074, 1572891, 1, 131074, 1572892, 1, 131074, 1572893, 1, 131074, 1572894, 1, 131074, 1572895, 1, 131074, 1572896, 1, 131075 )
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 32, 160 )
|
|
@ -1,28 +0,0 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://maps/map.gd" type="Script" id=1]
|
|
||||||
[ext_resource path="res://graphics/backgrounds/factory.png" type="Texture" id=2]
|
|
||||||
[ext_resource path="res://tilesets/t_horror.tres" type="TileSet" id=3]
|
|
||||||
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=4]
|
|
||||||
|
|
||||||
[node name="Map" type="Node2D" groups=["map"]]
|
|
||||||
pause_mode = 1
|
|
||||||
script = ExtResource( 1 )
|
|
||||||
target_time_any = null
|
|
||||||
target_time_100 = null
|
|
||||||
|
|
||||||
[node name="Background" type="CanvasLayer" parent="."]
|
|
||||||
layer = -1
|
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="Background"]
|
|
||||||
position = Vector2( 128, 96 )
|
|
||||||
texture = ExtResource( 2 )
|
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
|
||||||
tile_set = ExtResource( 3 )
|
|
||||||
cell_size = Vector2( 8, 8 )
|
|
||||||
format = 1
|
|
||||||
tile_data = PoolIntArray( 1376262, 2, 0, 1507326, 1, 1, 1507327, 1, 2, 1441792, 1, 2, 1441793, 1, 2, 1441794, 1, 2, 1441795, 1, 2, 1441796, 1, 2, 1441797, 1, 2, 1441798, 1, 2, 1441799, 1, 2, 1441800, 1, 2, 1441801, 1, 2, 1441802, 1, 2, 1441803, 1, 2, 1441804, 1, 2, 1441805, 1, 2, 1441806, 1, 2, 1441807, 1, 2, 1441808, 1, 2, 1441809, 1, 2, 1441810, 1, 2, 1441811, 1, 2, 1441812, 1, 2, 1441813, 1, 2, 1441814, 1, 2, 1441815, 1, 2, 1441816, 1, 2, 1441817, 1, 2, 1441818, 1, 2, 1441819, 1, 2, 1441820, 1, 2, 1441821, 1, 2, 1441822, 1, 2, 1441823, 1, 2, 1441824, 1, 2, 1441825, 1, 2, 1441826, 1, 3, 1572862, 1, 131073, 1572863, 1, 65538, 1507328, 1, 65538, 1507329, 1, 65538, 1507330, 1, 65538, 1507331, 1, 65538, 1507332, 1, 65538, 1507333, 1, 65538, 1507334, 1, 65538, 1507335, 1, 65538, 1507336, 1, 65538, 1507337, 1, 65538, 1507338, 1, 65538, 1507339, 1, 65538, 1507340, 1, 65538, 1507341, 1, 65538, 1507342, 1, 65538, 1507343, 1, 65538, 1507344, 1, 65538, 1507345, 1, 65538, 1507346, 1, 65538, 1507347, 1, 65538, 1507348, 1, 65538, 1507349, 1, 65538, 1507350, 1, 65538, 1507351, 1, 65538, 1507352, 1, 65538, 1507353, 1, 65538, 1507354, 1, 65538, 1507355, 1, 65538, 1507356, 1, 65538, 1507357, 1, 65538, 1507358, 1, 65538, 1507359, 1, 65538, 1507360, 1, 65538, 1507361, 1, 131074, 1507362, 1, 131075, 1638399, 1, 131073, 1572864, 1, 131074, 1572865, 1, 131074, 1572866, 1, 131074, 1572867, 1, 131074, 1572868, 1, 131074, 1572869, 1, 131074, 1572870, 1, 131074, 1572871, 1, 131074, 1572872, 1, 131074, 1572873, 1, 131074, 1572874, 1, 131074, 1572875, 1, 131074, 1572876, 1, 131074, 1572877, 1, 131074, 1572878, 1, 131074, 1572879, 1, 131074, 1572880, 1, 131074, 1572881, 1, 131074, 1572882, 1, 131074, 1572883, 1, 131074, 1572884, 1, 131074, 1572885, 1, 131074, 1572886, 1, 131074, 1572887, 1, 131074, 1572888, 1, 131074, 1572889, 1, 131074, 1572890, 1, 131074, 1572891, 1, 131074, 1572892, 1, 131074, 1572893, 1, 131074, 1572894, 1, 131074, 1572895, 1, 131074, 1572896, 1, 131075 )
|
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 4 )]
|
|
||||||
position = Vector2( 32, 160 )
|
|
|
@ -13,6 +13,8 @@ onready var remote_transform: RemoteTransform2D = $Pivot/RemoteTransform
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pivot.rotation = initial_angle * 0.785398 # TAU / 8.0
|
pivot.rotation = initial_angle * 0.785398 # TAU / 8.0
|
||||||
|
#Easy mode
|
||||||
|
if Game.is_easy_mode: speed *= Game.easy_mode_speed_factor
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
if Engine.editor_hint:
|
if Engine.editor_hint:
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://graphics/enemy/tin_eye.png" type="Texture" id=1]
|
[ext_resource path="res://graphics/enemy/tin_eye.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://objects/enemy/ghost_scholar.gd" type="Script" id=2]
|
[ext_resource path="res://objects/enemy/artificial_soul.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://graphics/enemy/artificial_soul.png" type="Texture" id=3]
|
[ext_resource path="res://graphics/enemy/artificial_soul.png" type="Texture" id=3]
|
||||||
|
|
||||||
[sub_resource type="Animation" id=2]
|
[sub_resource type="Animation" id=2]
|
||||||
|
@ -36,7 +36,7 @@ tracks/1/keys = {
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 3, 3.5 )
|
extents = Vector2( 3, 3.5 )
|
||||||
|
|
||||||
[node name="Ghost" type="Node2D"]
|
[node name="ArtificialSoul" type="Node2D"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
radius = 4.0
|
radius = 4.0
|
||||||
speed = 2.0
|
speed = 2.0
|
||||||
|
@ -50,7 +50,7 @@ rotation = 6.28319
|
||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Eye" type="Sprite" parent="Hitbox/Sprite"]
|
[node name="Eye" type="Sprite" parent="Hitbox/Sprite"]
|
||||||
modulate = Color( 0.580934, 0.97985, 0.561144, 1 )
|
modulate = Color( 0.560784, 1, 0.560784, 1 )
|
||||||
position = Vector2( 1, 0 )
|
position = Vector2( 1, 0 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ var shooting = false
|
||||||
var turns = 0
|
var turns = 0
|
||||||
|
|
||||||
const BoneParticle = preload("res://objects/enemy/bone_particle.tscn")
|
const BoneParticle = preload("res://objects/enemy/bone_particle.tscn")
|
||||||
const EasyBullet = preload("res://objects/environment/turret/turret_bullet.tscn")
|
const EasyBullet = preload("res://objects/enemy/roboturret_proj.tscn")
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
if Engine.editor_hint:
|
if Engine.editor_hint:
|
||||||
|
@ -39,11 +39,6 @@ func _ready():
|
||||||
sprite.speed_scale = inverse_lerp(0.0, 25.0, walk_speed)
|
sprite.speed_scale = inverse_lerp(0.0, 25.0, walk_speed)
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
var easy_bullet = EasyBullet.instance()
|
|
||||||
easy_bullet.direction = Vector2.RIGHT
|
|
||||||
easy_bullet.global_position = global_position
|
|
||||||
get_parent().call_deferred("add_child", easy_bullet)
|
|
||||||
Game.instance_node(EasyBullet,global_position.x,global_position.y,self)
|
|
||||||
if Engine.editor_hint:
|
if Engine.editor_hint:
|
||||||
return
|
return
|
||||||
if !shooting:
|
if !shooting:
|
||||||
|
@ -52,8 +47,12 @@ func _physics_process(delta):
|
||||||
if collider != null && (collider.is_in_group("player") or collider.is_in_group("msx")):
|
if collider != null && (collider.is_in_group("player") or collider.is_in_group("msx")):
|
||||||
if Game.get_sector(global_position) == Game.get_sector(collider.global_position):
|
if Game.get_sector(global_position) == Game.get_sector(collider.global_position):
|
||||||
if Game.is_easy_mode:
|
if Game.is_easy_mode:
|
||||||
#Console.print("test")
|
var easy_bullet = EasyBullet.instance()
|
||||||
Game.instance_node(EasyBullet,global_position.x,global_position.y,self)
|
easy_bullet.target_group = "player"
|
||||||
|
easy_bullet.direction = sign(shoot_position.global_position.x - global_position.x)
|
||||||
|
easy_bullet.global_position = shoot_position.global_position
|
||||||
|
easy_bullet.speed = 100
|
||||||
|
get_parent().call_deferred("add_child", easy_bullet)
|
||||||
else:
|
else:
|
||||||
# kill player and enter shooting state temporarily
|
# kill player and enter shooting state temporarily
|
||||||
collider.get_parent().die()
|
collider.get_parent().die()
|
||||||
|
@ -62,7 +61,7 @@ func _physics_process(delta):
|
||||||
# muzzle flash
|
# muzzle flash
|
||||||
muzzle_flash.emitting = true
|
muzzle_flash.emitting = true
|
||||||
shooting = true
|
shooting = true
|
||||||
get_tree().create_timer(0.05, false).connect("timeout", self, "_stop_shoot")
|
get_tree().create_timer(0.5, false).connect("timeout", self, "_stop_shoot")
|
||||||
sprite.play("shoot")
|
sprite.play("shoot")
|
||||||
# check other raycast to find collision passing through player
|
# check other raycast to find collision passing through player
|
||||||
graphics_cast.force_raycast_update()
|
graphics_cast.force_raycast_update()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue