update villain sprites
This commit is contained in:
parent
b3ebeb7306
commit
21f7746f8a
29 changed files with 378 additions and 53 deletions
BIN
Assets/oeil/0.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/0.png
(Stored with Git LFS)
Executable file
Binary file not shown.
6
Assets/tmp3.png.import → Assets/oeil/0.png.import
Normal file → Executable file
6
Assets/tmp3.png.import → Assets/oeil/0.png.import
Normal file → Executable file
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/tmp3.png-0afe8b1e9c47be51c701b0d537c4b45a.stex"
|
||||
path="res://.import/0.png-aab8ea6436f77d0de8234ee1e907b33c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/tmp3.png"
|
||||
dest_files=[ "res://.import/tmp3.png-0afe8b1e9c47be51c701b0d537c4b45a.stex" ]
|
||||
source_file="res://Assets/oeil/0.png"
|
||||
dest_files=[ "res://.import/0.png-aab8ea6436f77d0de8234ee1e907b33c.stex" ]
|
||||
|
||||
[params]
|
||||
|
BIN
Assets/oeil/1.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/1.png
(Stored with Git LFS)
Executable file
Binary file not shown.
6
Assets/tmp1.png.import → Assets/oeil/1.png.import
Normal file → Executable file
6
Assets/tmp1.png.import → Assets/oeil/1.png.import
Normal file → Executable file
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/tmp1.png-0c1a3d9d3390acb57bea785b3f9e30f7.stex"
|
||||
path="res://.import/1.png-988e44760c0ae733dcaea4b5bcfb6fb8.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/tmp1.png"
|
||||
dest_files=[ "res://.import/tmp1.png-0c1a3d9d3390acb57bea785b3f9e30f7.stex" ]
|
||||
source_file="res://Assets/oeil/1.png"
|
||||
dest_files=[ "res://.import/1.png-988e44760c0ae733dcaea4b5bcfb6fb8.stex" ]
|
||||
|
||||
[params]
|
||||
|
BIN
Assets/oeil/2.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/2.png
(Stored with Git LFS)
Executable file
Binary file not shown.
6
Assets/tmp2.png.import → Assets/oeil/2.png.import
Normal file → Executable file
6
Assets/tmp2.png.import → Assets/oeil/2.png.import
Normal file → Executable file
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/tmp2.png-ed8b7dcf1a8f661b4546e218d233b408.stex"
|
||||
path="res://.import/2.png-1ff9afeca4806bc3c21ecbd49bd6edca.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/tmp2.png"
|
||||
dest_files=[ "res://.import/tmp2.png-ed8b7dcf1a8f661b4546e218d233b408.stex" ]
|
||||
source_file="res://Assets/oeil/2.png"
|
||||
dest_files=[ "res://.import/2.png-1ff9afeca4806bc3c21ecbd49bd6edca.stex" ]
|
||||
|
||||
[params]
|
||||
|
BIN
Assets/oeil/3.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/3.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/oeil/3.png.import
Executable file
35
Assets/oeil/3.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/3.png-fb4c2c875bedb0a5b9a15aaceb5db7a6.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/oeil/3.png"
|
||||
dest_files=[ "res://.import/3.png-fb4c2c875bedb0a5b9a15aaceb5db7a6.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=true
|
||||
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
|
BIN
Assets/oeil/4.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/4.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/oeil/4.png.import
Executable file
35
Assets/oeil/4.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/4.png-7fe1e66a304beb8b8f288b2e20552fb7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/oeil/4.png"
|
||||
dest_files=[ "res://.import/4.png-7fe1e66a304beb8b8f288b2e20552fb7.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=true
|
||||
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
|
BIN
Assets/oeil/5.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/5.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/oeil/5.png.import
Executable file
35
Assets/oeil/5.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/5.png-bfc4574c3b23de470ee5e4b441d75685.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/oeil/5.png"
|
||||
dest_files=[ "res://.import/5.png-bfc4574c3b23de470ee5e4b441d75685.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=true
|
||||
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
|
BIN
Assets/oeil/6.png
(Stored with Git LFS)
Executable file
BIN
Assets/oeil/6.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/oeil/6.png.import
Executable file
35
Assets/oeil/6.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/6.png-0d212346d3154516cc8685f08785d0ab.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/oeil/6.png"
|
||||
dest_files=[ "res://.import/6.png-0d212346d3154516cc8685f08785d0ab.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=true
|
||||
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
|
BIN
Assets/tmp1.png
(Stored with Git LFS)
BIN
Assets/tmp1.png
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/tmp2.png
(Stored with Git LFS)
BIN
Assets/tmp2.png
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/tmp3.png
(Stored with Git LFS)
BIN
Assets/tmp3.png
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/warning/0.png
(Stored with Git LFS)
Executable file
BIN
Assets/warning/0.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/warning/0.png.import
Executable file
35
Assets/warning/0.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/0.png-27f9a855fab4c2014c67992f0f29df5c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/warning/0.png"
|
||||
dest_files=[ "res://.import/0.png-27f9a855fab4c2014c67992f0f29df5c.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=true
|
||||
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
|
BIN
Assets/warning/1.png
(Stored with Git LFS)
Executable file
BIN
Assets/warning/1.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/warning/1.png.import
Executable file
35
Assets/warning/1.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/1.png-b3d440a789e97edae5d3bf6ecc56ccd9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/warning/1.png"
|
||||
dest_files=[ "res://.import/1.png-b3d440a789e97edae5d3bf6ecc56ccd9.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=true
|
||||
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
|
BIN
Assets/warning/2.png
(Stored with Git LFS)
Executable file
BIN
Assets/warning/2.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/warning/2.png.import
Executable file
35
Assets/warning/2.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/2.png-cf34b6dbfc69e919cd206f0f696a58b8.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/warning/2.png"
|
||||
dest_files=[ "res://.import/2.png-cf34b6dbfc69e919cd206f0f696a58b8.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=true
|
||||
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
|
BIN
Assets/warning/3.png
(Stored with Git LFS)
Executable file
BIN
Assets/warning/3.png
(Stored with Git LFS)
Executable file
Binary file not shown.
35
Assets/warning/3.png.import
Executable file
35
Assets/warning/3.png.import
Executable file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/3.png-84accc014138671d10224939234f4b7b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/warning/3.png"
|
||||
dest_files=[ "res://.import/3.png-84accc014138671d10224939234f4b7b.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=true
|
||||
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
|
|
@ -7,33 +7,38 @@ var limit_random
|
|||
var rng = RandomNumberGenerator.new()
|
||||
onready var button = $"../Button/"
|
||||
|
||||
# True if animation should change
|
||||
var next = false
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
timer = 0
|
||||
rng.randomize()
|
||||
limit_random = rng.randi_range(2, 10)
|
||||
me.play("orange")
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
timer += delta
|
||||
match me.get_frame():
|
||||
0:
|
||||
# Vert
|
||||
if timer >= limit_random:
|
||||
timer = 0
|
||||
limit_random = rng.randi_range(2, 10)
|
||||
me.set_frame(1)
|
||||
1:
|
||||
# Orange
|
||||
if timer >= .5:
|
||||
timer = 0
|
||||
me.set_frame(2)
|
||||
2:
|
||||
# Rouge
|
||||
if timer >= 2:
|
||||
timer = 0
|
||||
me.set_frame(0)
|
||||
_:
|
||||
print("Not handled frame")
|
||||
|
||||
var animations = ["orange", "red"]
|
||||
|
||||
var max_frame = me.frames.get_frame_count(me.animation) - 1
|
||||
var current_anim_idx = animations.find(me.animation)
|
||||
if current_anim_idx >= animations.size() - 1:
|
||||
# Last animation reached
|
||||
check_next_animframe(me, max_frame, animations[0])
|
||||
else:
|
||||
check_next_animframe(me, max_frame, animations[current_anim_idx + 1])
|
||||
|
||||
|
||||
# Jump to next animation at the end of the current one
|
||||
func check_next_animframe(me, max_frame, next_animation):
|
||||
if me.frame == 0 and next:
|
||||
me.play(next_animation)
|
||||
next = false
|
||||
if max_frame == me.frame:
|
||||
# Last frame of animation reached
|
||||
next = true
|
||||
|
|
|
@ -1,21 +1,33 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://Assets/tmp1.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Assets/tmp3.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Assets/tmp2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Assets/oeil/0.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Assets/oeil/1.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Assets/oeil/3.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Characters/Villain.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Assets/oeil/4.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Assets/oeil/5.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Assets/oeil/6.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Assets/oeil/2.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Assets/warning/2.png" type="Texture" id=9]
|
||||
[ext_resource path="res://Assets/warning/1.png" type="Texture" id=10]
|
||||
[ext_resource path="res://Assets/warning/3.png" type="Texture" id=11]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 1 ) ],
|
||||
"frames": [ ExtResource( 10 ), ExtResource( 9 ), ExtResource( 11 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
"name": "orange",
|
||||
"speed": 1.5
|
||||
}, {
|
||||
"frames": [ ExtResource( 1 ), ExtResource( 2 ), ExtResource( 8 ), ExtResource( 3 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ) ],
|
||||
"loop": true,
|
||||
"name": "red",
|
||||
"speed": 2.0
|
||||
} ]
|
||||
|
||||
[node name="Villain" type="Node2D"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
scale = Vector2( 5, 5 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "orange"
|
||||
|
|
|
@ -3,8 +3,8 @@ extends Button
|
|||
onready var villain = $"../Villain/AnimatedSprite"
|
||||
|
||||
var etat
|
||||
var texture_pressed = preload("res://Assets/skin_assets/button_normal.png")
|
||||
var texture_released = preload("res://Assets/skin_assets/button_pressed.png")
|
||||
const texture_pressed = preload("res://Assets/skin_assets/button_normal.png")
|
||||
const texture_released = preload("res://Assets/skin_assets/button_pressed.png")
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
@ -15,11 +15,14 @@ func _ready():
|
|||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
if etat:
|
||||
match villain.get_frame():
|
||||
2:
|
||||
print("non") if etat else print("caché")
|
||||
print("non")
|
||||
_:
|
||||
print("oui") if etat else print("caché")
|
||||
print("oui")
|
||||
else:
|
||||
print("caché")
|
||||
|
||||
|
||||
func _on_Button_pressed():
|
||||
|
|
|
@ -31,7 +31,8 @@ text = "CLIQUE MOI"
|
|||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Villain" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 943, 639 )
|
||||
position = Vector2( 871, 589 )
|
||||
scale = Vector2( 0.2, 0.2 )
|
||||
|
||||
[node name="Windows" type="Sprite" parent="."]
|
||||
visible = false
|
||||
|
|
Reference in a new issue