Skip to content

Commit

Permalink
added elite guard animations
Browse files Browse the repository at this point in the history
  • Loading branch information
themangomago committed Dec 20, 2020
1 parent 52e0938 commit 1d80a1d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 14 deletions.
Binary file modified Assets/Guards/EliteGuard.ase
Binary file not shown.
Binary file modified Assets/Guards/EliteGuard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Guards/EliteGuardGreen.ase
Binary file not shown.
Binary file modified Assets/Guards/EliteGuardGreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Src/Guard/EliteGuard/EliteGuard.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var player
onready var losRay: RayCast2D = $Flippable/LOSRay
onready var pathLine: PathLine = $PathLine

var guard_normal_texture: Texture = preload("res://Assets/Guards/EliteGuard.png")
var guard_green_texture: Texture = preload("res://Assets/Guards/EliteGuardGreen.png")

func _ready() -> void:
speed = normalSpeed
Expand All @@ -21,6 +23,12 @@ func _ready() -> void:
$Flippable/TaserRange.connect("body_entered", self, "onTaserRangeBodyEntered")
$AnimationPlayer.connect("animation_finished", self, "onAnimationFinished")

# sets sprite texture on level type
match Global.game_manager.getCurrentLevel().level_type:
Types.LevelTypes.Western:
$Flippable/Sprite.texture = guard_normal_texture
Types.LevelTypes.Eastern:
$Flippable/Sprite.texture = guard_green_texture

func _physics_process(delta: float) -> void:
velocity = direction * speed
Expand Down
8 changes: 4 additions & 4 deletions Src/Guard/EliteGuard/EliteGuard.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2 ),
"transitions": PoolRealArray( 1, 1 ),
"times": PoolRealArray( 0, 0.1, 0.2 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 9, 10 ]
"values": [ 0, 9, 10 ]
}

[sub_resource type="Animation" id=5]
Expand Down Expand Up @@ -69,7 +69,7 @@ script = ExtResource( 2 )
position = Vector2( 0, -16 )
texture = ExtResource( 1 )
hframes = 11
frame = 5
frame = 6

[node name="LineOfSight" type="Area2D" parent="Flippable"]

Expand Down
10 changes: 0 additions & 10 deletions Src/Levels/TestLevel.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,10 @@ door_name = "DoorWall11"
[node name="StaircaseCellar" parent="LevelObjects/Doors" instance=ExtResource( 10 )]
position = Vector2( 240, 320 )
connected_door_path = NodePath("../../../../Level6/LevelObjects/Doors/StaircaseE0")
lockLevel = 0
doorType = 0
door_name = ""

[node name="StaircaseE0" parent="LevelObjects/Doors" instance=ExtResource( 10 )]
position = Vector2( 240, 256 )
connected_door_path = NodePath("../../../../Level6/LevelObjects/Doors/StaircaseCellar")
lockLevel = 0
doorType = 0
door_name = ""

[node name="DoorWall" parent="LevelObjects/Doors" instance=ExtResource( 8 )]
position = Vector2( -196.565, 256 )
Expand All @@ -134,9 +128,7 @@ hint = "This door is locked "
[node name="Staircase" parent="LevelObjects/Doors" instance=ExtResource( 10 )]
position = Vector2( -129.695, 256.354 )
connected_door_path = NodePath("../StaircaseE0")
lockLevel = 0
doorType = 1
door_name = ""

[node name="Lights" type="Node2D" parent="LevelObjects"]
__meta__ = {
Expand Down Expand Up @@ -218,8 +210,6 @@ script = ExtResource( 15 )

[node name="Closet" parent="." instance=ExtResource( 23 )]
position = Vector2( -240, 256 )
canHidePlayer = true
canBeOpened = true

[node name="Guard" parent="." instance=ExtResource( 22 )]
position = Vector2( -362.162, 254.294 )
Expand Down
Binary file added _Org/_steam/events/week1/dog.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _Org/_steam/events/week1/portraits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1d80a1d

Please sign in to comment.