Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c79c7fe8eb
|
@ -14,5 +14,5 @@ tracks/0/keys = {
|
|||
"times": PoolRealArray( 0, 0.05, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 0.964706, 0.462745, 0.462745, 1 ), Color( 10, 10, 10, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
"values": [ Color( 10, 10, 10, 1 ), Color( 10, 10, 10, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[gd_resource type="Animation" format=2]
|
||||
|
||||
[resource]
|
||||
resource_name = "Skeleton Hit"
|
||||
resource_name = "Hit"
|
||||
length = 0.1
|
||||
step = 0.05
|
||||
tracks/0/type = "value"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://ai/Script/Skeleton Enemy.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Music and Fonts(Misc.)/Skeleton Hit.tres" type="Animation" id=2]
|
||||
[ext_resource path="res://art/Skeleton.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=4]
|
||||
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 5, 7 )
|
||||
|
@ -44,16 +42,6 @@ enabled = true
|
|||
cast_to = Vector2( 80, 0 )
|
||||
collision_mask = 3
|
||||
|
||||
[node name="RayCast2D3" type="RayCast2D" parent="."]
|
||||
enabled = true
|
||||
cast_to = Vector2( -80, -25 )
|
||||
collision_mask = 3
|
||||
|
||||
[node name="RayCast2D4" type="RayCast2D" parent="."]
|
||||
enabled = true
|
||||
cast_to = Vector2( 80, -25 )
|
||||
collision_mask = 3
|
||||
|
||||
[node name="ShootDelay" type="Timer" parent="."]
|
||||
wait_time = 1.239
|
||||
one_shot = true
|
||||
|
@ -71,5 +59,4 @@ autoplay = "Skeleton Jump"
|
|||
"anims/Skeleton Jump" = SubResource( 2 )
|
||||
|
||||
[node name="AnimationPlayer2" type="AnimationPlayer" parent="."]
|
||||
anims/Hit = ExtResource( 4 )
|
||||
"anims/Skeleton Hit" = ExtResource( 2 )
|
||||
anims/Hit = ExtResource( 2 )
|
||||
|
|
|
@ -25,7 +25,7 @@ radius = 3.0
|
|||
height = 2.0
|
||||
|
||||
[node name="KinematicBody2D" type="KinematicBody2D"]
|
||||
collision_layer = 8
|
||||
collision_layer = 16
|
||||
collision_mask = 3
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
|
|
|
@ -7,7 +7,7 @@ onready var ProjectileSpawn: Node2D = $Position2D
|
|||
onready var PlayerRaycast: RayCast2D = $PlayerRaycast
|
||||
|
||||
func _ready():
|
||||
health = 0.5
|
||||
health = 2
|
||||
knockback_amount = 700
|
||||
|
||||
func _physics_process(_delta):
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
extends Enemy
|
||||
|
||||
export var max_range: int = 200
|
||||
export var stationary: bool = false
|
||||
|
||||
var Spinning_Bone = preload("res://ai/Scenes/SpinningBone.tscn")
|
||||
|
||||
onready var ShootDelay : Timer = $ShootDelay
|
||||
onready var ProjectileSpawn: Node2D = $Position2D
|
||||
|
||||
func _ready():
|
||||
health = 1.5
|
||||
$RayCast2D.cast_to.x = -1 * max_range
|
||||
$RayCast2D2.cast_to.y = 1 * max_ranged
|
||||
|
||||
func apply_gravity(delta, modifier = 1):
|
||||
velocity.y += gravity * delta * modifier
|
||||
|
||||
|
@ -28,7 +36,7 @@ func _physics_process(_delta):
|
|||
velocity.x *= speed
|
||||
velocity = move_and_slide(velocity, UP)
|
||||
|
||||
if dist <= 200:
|
||||
if dist <= max_range and not stationary:
|
||||
velocity.x = position.direction_to(Player.position).normalized().x
|
||||
else:
|
||||
velocity = Vector2(0, 0)
|
||||
|
|
|
@ -8,7 +8,7 @@ onready var Hurtbox = $Area2D
|
|||
|
||||
func _ready():
|
||||
speed = 50
|
||||
health = 3
|
||||
health = 5
|
||||
|
||||
func _physics_process(delta):
|
||||
if knockback != Vector2.ZERO:
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@
|
|||
radius = 6.08276
|
||||
|
||||
[node name="EcoProjectile" type="KinematicBody2D"]
|
||||
scale = Vector2( 1.5, 1.5 )
|
||||
collision_layer = 8
|
||||
collision_mask = 6
|
||||
script = ExtResource( 2 )
|
||||
|
|
|
@ -7,11 +7,10 @@ var projectile = null
|
|||
onready var ChargeTimer: Timer = $ChargeTimer
|
||||
|
||||
func fire(p):
|
||||
print(p)
|
||||
projectile = p
|
||||
if ChargeTimer.is_stopped():
|
||||
ChargeTimer.start()
|
||||
if charge_level == 0:
|
||||
if charge_level == 0 and p != null:
|
||||
var temp = p.instance()
|
||||
get_tree().current_scene.add_child(temp)
|
||||
var energy = temp.energy_cost
|
||||
|
@ -27,7 +26,7 @@ func _on_ChargeTimer_timeout():
|
|||
func _input(event):
|
||||
if event.is_action_released("shoot"):
|
||||
ChargeTimer.stop()
|
||||
if charge_level <= 0:
|
||||
if charge_level <= 0 or projectile == null:
|
||||
charge_level = 0
|
||||
return
|
||||
var temp = projectile.instance()
|
||||
|
|
|
@ -11,7 +11,6 @@ func _process(delta):
|
|||
$Label.text = "F to Open"
|
||||
if Input.is_action_just_pressed("open"):
|
||||
Player.current_scene = next_scene
|
||||
print(Player.current_scene)
|
||||
get_tree().change_scene(""+next_scene+"")
|
||||
else:
|
||||
$Label.text = "Locked"
|
||||
|
|
Loading…
Reference in a new issue