Adds additional graphics for bent heads for ouroborosing
parent
dfee5ebc1e
commit
e5d6f3d786
|
@ -11,6 +11,10 @@ func update_score() -> void:
|
|||
|
||||
func restart():
|
||||
get_tree().change_scene_to_packed(load("res://Scenes/main.tscn"))
|
||||
GridManager.current_allowed_spawns.clear()
|
||||
GameManager.score = 0
|
||||
|
||||
func back():
|
||||
get_tree().change_scene_to_packed(main_menu)
|
||||
GridManager.current_allowed_spawns.clear()
|
||||
GameManager.score = 0
|
||||
|
|
|
@ -42,6 +42,8 @@ var sprite : Sprite2D = $Sprite2D
|
|||
var image_head : CompressedTexture2D = preload("res://Sprites/snake_head.png")
|
||||
var image_head_dead : CompressedTexture2D = preload("res://Sprites/snake_head_dead.png")
|
||||
var image_head_ouroboros : CompressedTexture2D = preload("res://Sprites/snake_head_ouroboros.png")
|
||||
var image_head_ouroboros_left : CompressedTexture2D = preload("res://Sprites/snake_head_ouroboros_left.png")
|
||||
var image_head_ouroboros_right : CompressedTexture2D = preload("res://Sprites/snake_head_ouroboros_right.png")
|
||||
var image_left : CompressedTexture2D = preload("res://Sprites/snake_left.png")
|
||||
var image_right : CompressedTexture2D = preload("res://Sprites/snake_right.png")
|
||||
var image_straight : CompressedTexture2D = preload("res://Sprites/snake_straight.png")
|
||||
|
@ -203,8 +205,15 @@ func update_sprite() -> void:
|
|||
sprite.texture = image_head
|
||||
States.DEAD:
|
||||
sprite.texture = image_head_dead
|
||||
return
|
||||
_:
|
||||
sprite.texture = image_head_ouroboros
|
||||
var tail_rel_direction : float = current_direction.angle_to(old_direction)
|
||||
if abs(tail_rel_direction) < 0.1:
|
||||
sprite.texture = image_head_ouroboros
|
||||
elif tail_rel_direction > 0:
|
||||
sprite.texture = image_head_ouroboros_left
|
||||
elif tail_rel_direction < 0:
|
||||
sprite.texture = image_head_ouroboros_right
|
||||
PartTypes.TAIL:
|
||||
if state == States.OUROBOROS or state == States.OLD_OUROBOROS:
|
||||
var tail_rel_direction : float = current_direction.angle_to(position - commanding_head.position)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 637 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dxw7jfyp8e1qx"
|
||||
path="res://.godot/imported/snake_head_ouroboros_left.png-9bd390d425719c3e97efdb36d86a890b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/snake_head_ouroboros_left.png"
|
||||
dest_files=["res://.godot/imported/snake_head_ouroboros_left.png-9bd390d425719c3e97efdb36d86a890b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
After Width: | Height: | Size: 664 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 648 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dmi37gjx77kfr"
|
||||
path="res://.godot/imported/snake_head_ouroboros_right.png-e0525f58136feb93b8340d350f716a12.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/snake_head_ouroboros_right.png"
|
||||
dest_files=["res://.godot/imported/snake_head_ouroboros_right.png-e0525f58136feb93b8340d350f716a12.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Loading…
Reference in New Issue