commit
2990500e27
@ -22,7 +22,7 @@ allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=8.0
|
||||
oversampling=10.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
|
@ -1,15 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=5 format=3 uid="uid://bxtiv2esuer8v"]
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=6 format=3 uid="uid://bxtiv2esuer8v"]
|
||||
|
||||
[ext_resource type="Script" path="res://Resources/spellbook.gd" id="1_t8h8m"]
|
||||
[ext_resource type="Resource" uid="uid://1xbik4qndtkh" path="res://Resources/Spells/firebolt.tres" id="2_ln222"]
|
||||
[ext_resource type="Resource" uid="uid://dl6nv6lp460n3" path="res://Resources/Spells/rockThrow.tres" id="3_ocgmh"]
|
||||
[ext_resource type="Resource" uid="uid://bmpu6k55bckdv" path="res://Resources/Spells/fireball.tres" id="4_kv0hs"]
|
||||
[ext_resource type="Resource" uid="uid://c6mwbnutxm3vb" path="res://Resources/Spells/icyWind.tres" id="5_eymrm"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_t8h8m")
|
||||
name = "Old Book"
|
||||
description = "An old spellbook you found on the side of the road"
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ln222"), ExtResource("3_ocgmh"), ExtResource("4_kv0hs")])
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ln222"), ExtResource("3_ocgmh"), ExtResource("4_kv0hs"), ExtResource("5_eymrm")])
|
||||
damageMod = 1.0
|
||||
defenseMod = 1.0
|
||||
element = 0
|
||||
|
@ -1,13 +1,15 @@
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=3 format=3 uid="uid://g86hap7s43n8"]
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=5 format=3 uid="uid://g86hap7s43n8"]
|
||||
|
||||
[ext_resource type="Script" path="res://Resources/spellbook.gd" id="1_pn4te"]
|
||||
[ext_resource type="Resource" uid="uid://dl6nv6lp460n3" path="res://Resources/Spells/rockThrow.tres" id="2_ofx8j"]
|
||||
[ext_resource type="Resource" uid="uid://bmpu6k55bckdv" path="res://Resources/Spells/fireball.tres" id="3_brupg"]
|
||||
[ext_resource type="Resource" uid="uid://1xbik4qndtkh" path="res://Resources/Spells/firebolt.tres" id="4_chcd4"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pn4te")
|
||||
name = "Wizard Spellbook"
|
||||
description = "A spellbook used by wizards"
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ofx8j")])
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ofx8j"), ExtResource("3_brupg"), ExtResource("4_chcd4")])
|
||||
damageMod = 1.2
|
||||
defenseMod = 1.2
|
||||
element = 0
|
||||
|
@ -12,7 +12,6 @@ animation = "res://Scenes/Animations/fireballAnim.tscn"
|
||||
damage = 8.0
|
||||
backfireStrength = 6.0
|
||||
castCombo = Array[String](["up", "down", "down", "left", "right", "left", "right", "up"])
|
||||
castProgress = 0
|
||||
element = 1
|
||||
stunning = true
|
||||
timeout = 5.0
|
||||
|
@ -8,11 +8,10 @@ script = ExtResource("1_r2m62")
|
||||
icon = ExtResource("1_0yb3x")
|
||||
name = "Icy Wind"
|
||||
description = "Blows frigid wind at your opponent"
|
||||
animation = ""
|
||||
animation = "res://Scenes/Animations/icyWindAnim.tscn"
|
||||
damage = 4.0
|
||||
backfireStrength = 2.0
|
||||
castCombo = Array[String](["left", "left", "left", "down", "left"])
|
||||
castProgress = 0
|
||||
element = 2
|
||||
stunning = false
|
||||
timeout = 5.0
|
||||
|
@ -12,7 +12,6 @@ animation = "res://Scenes/Animations/rockThrowAnim.tscn"
|
||||
damage = 0.5
|
||||
backfireStrength = 1.0
|
||||
castCombo = Array[String](["down", "up", "up"])
|
||||
castProgress = 0
|
||||
element = 4
|
||||
stunning = true
|
||||
timeout = 10.0
|
||||
|
@ -6,10 +6,10 @@ class_name Playlist
|
||||
var randomized: Array[int]
|
||||
var index: int = 0
|
||||
|
||||
func init(randomize: bool) -> void:
|
||||
func init(randomify: bool) -> void:
|
||||
for i in range(music.size()):
|
||||
randomized.append(i)
|
||||
if randomize:
|
||||
if randomify:
|
||||
shuffle()
|
||||
|
||||
func getNext() -> String:
|
||||
@ -20,7 +20,7 @@ func getNext() -> String:
|
||||
return ret
|
||||
|
||||
func shuffle() -> void:
|
||||
var shuffled: Array[int]
|
||||
var shuffled: Array[int] = []
|
||||
for i in range(randomized.size()):
|
||||
var x: int = randomized.pick_random()
|
||||
randomized.erase(x)
|
||||
|
@ -1,15 +1,9 @@
|
||||
[gd_scene load_steps=69 format=3 uid="uid://dct5w5mffqmlm"]
|
||||
[gd_scene load_steps=86 format=3 uid="uid://dct5w5mffqmlm"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Animations/fireballAnim.gd" id="1_eh23w"]
|
||||
[ext_resource type="Texture2D" uid="uid://s1wipkprymf7" path="res://Sprites/Particles/Particles Cleaned/16_sunburn_spritesheet.png" id="2_a2rii"]
|
||||
[ext_resource type="Texture2D" uid="uid://df1rqga22alvj" path="res://Sprites/Particles/Particles Cleaned/Effect_BigHit_1_557x553.png" id="3_unynm"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_chn67"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 253, 283, 0, 0, 0, 0, 249, 56, 0, 0, 0, 0, 883, 258)
|
||||
}
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_6walw"]
|
||||
particles_animation = true
|
||||
particles_anim_h_frames = 6
|
||||
@ -462,30 +456,426 @@ animations = [{
|
||||
"speed": 60.0
|
||||
}]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wgnw8"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(253, 241)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.2, 0.2)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wf5px"]
|
||||
resource_name = "attackInverse0"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(890, 283), Vector2(890, 241)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(0.2, 0.2)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yy8ft"]
|
||||
resource_name = "attackInverse1"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(890, 241), Vector2(890, 210)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.2, 0.2), Vector2(0.6, 0.6)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_v42n0"]
|
||||
resource_name = "attackInverse2"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(890, 210), Vector2(890, 146)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.6, 0.6), Vector2(1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vxtqp"]
|
||||
resource_name = "attackInverse3"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(890, 146), Vector2(890, 104)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1), Vector2(2.2, 2.2)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_if6re"]
|
||||
resource_name = "attackInverse4"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(2.2, 2.2), Vector2(3.4, 3.4)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_y406p"]
|
||||
resource_name = "attackInverse5"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(3.4, 3.4), Vector2(4.8, 4.8)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_et7ce"]
|
||||
resource_name = "attackInverse6"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(4.8, 4.8), Vector2(7, 7)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e75l3"]
|
||||
resource_name = "attackInverse7"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(890, 104), Vector2(250, 286)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_r8anb"]
|
||||
resource_name = "attackSegment0"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 2,
|
||||
"values": [Vector2(253, 283), Vector2(253, 241)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(0.2, 0.2)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7m6oo"]
|
||||
resource_name = "attackSegment1"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(253, 241), Vector2(253, 210)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.2, 0.2), Vector2(0.6, 0.6)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jvbiy"]
|
||||
resource_name = "attackSegment2"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(253, 210), Vector2(253, 146)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.6, 0.6), Vector2(1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_l7vac"]
|
||||
resource_name = "attackSegment3"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(253, 146), Vector2(253, 104)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1), Vector2(2.2, 2.2)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yc0ak"]
|
||||
resource_name = "attackSegment4"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(2.2, 2.2), Vector2(3.4, 3.4)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gnoe5"]
|
||||
resource_name = "attackSegment5"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(3.4, 3.4), Vector2(4.8, 4.8)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_46ufo"]
|
||||
resource_name = "attackSegment6"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(4.8, 4.8), Vector2(7, 7)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_y4mhj"]
|
||||
resource_name = "attackSegment7"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(253, 104), Vector2(896, 286)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_r6j4e"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_wgnw8"),
|
||||
"attackInverse0": SubResource("Animation_wf5px"),
|
||||
"attackInverse1": SubResource("Animation_yy8ft"),
|
||||
"attackInverse2": SubResource("Animation_v42n0"),
|
||||
"attackInverse3": SubResource("Animation_vxtqp"),
|
||||
"attackInverse4": SubResource("Animation_if6re"),
|
||||
"attackInverse5": SubResource("Animation_y406p"),
|
||||
"attackInverse6": SubResource("Animation_et7ce"),
|
||||
"attackInverse7": SubResource("Animation_e75l3"),
|
||||
"attackSegment0": SubResource("Animation_r8anb"),
|
||||
"attackSegment1": SubResource("Animation_7m6oo"),
|
||||
"attackSegment2": SubResource("Animation_jvbiy"),
|
||||
"attackSegment3": SubResource("Animation_l7vac"),
|
||||
"attackSegment4": SubResource("Animation_yc0ak"),
|
||||
"attackSegment5": SubResource("Animation_gnoe5"),
|
||||
"attackSegment6": SubResource("Animation_46ufo"),
|
||||
"attackSegment7": SubResource("Animation_y4mhj")
|
||||
}
|
||||
|
||||
[node name="FireballAnim" type="Node2D"]
|
||||
script = ExtResource("1_eh23w")
|
||||
startPrimaryLoc = Vector2(193, 137)
|
||||
startSecondaryLoc = Vector2(350, 137)
|
||||
fullSize = 7.0
|
||||
finalIndex = 8
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="."]
|
||||
curve = SubResource("Curve2D_chn67")
|
||||
|
||||
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
|
||||
position = Vector2(253, 283)
|
||||
rotation = -1.5708
|
||||
rotates = false
|
||||
loop = false
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="Path2D/PathFollow2D"]
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
||||
material = SubResource("CanvasItemMaterial_6walw")
|
||||
rotation = 1.5708
|
||||
position = Vector2(253, 283)
|
||||
emitting = false
|
||||
process_material = SubResource("ParticleProcessMaterial_cjfl8")
|
||||
texture = ExtResource("3_unynm")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Path2D/PathFollow2D"]
|
||||
rotation = 1.5708
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(253, 241)
|
||||
scale = Vector2(0.2, 0.2)
|
||||
sprite_frames = SubResource("SpriteFrames_xup3y")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_r6j4e")
|
||||
}
|
||||
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="animFinished"]
|
||||
|
File diff suppressed because it is too large
Load Diff
560
Scenes/Animations/icyWindAnim.tscn
Normal file
560
Scenes/Animations/icyWindAnim.tscn
Normal file
@ -0,0 +1,560 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://cby0hie21caqv"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Animations/icyWindAnim.gd" id="1_aonld"]
|
||||
[ext_resource type="Texture2D" uid="uid://vfd8mkmxtqxq" path="res://Sprites/Particles/Particles Cleaned/12_nebula_spritesheet.png" id="2_onmly"]
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ebtcy"]
|
||||
particles_animation = true
|
||||
particles_anim_h_frames = 8
|
||||
particles_anim_v_frames = 8
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="Curve" id="Curve_yaeb4"]
|
||||
_data = [Vector2(0, 0), 0.0, 3.47985, 0, 0, Vector2(0.133333, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -3.03297, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_f1cta"]
|
||||
curve = SubResource("Curve_yaeb4")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_7lscu"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 6
|
||||
emission_ring_axis = Vector3(0, 0, 1)
|
||||
emission_ring_height = 1.0
|
||||
emission_ring_radius = 80.0
|
||||
emission_ring_inner_radius = 40.0
|
||||
spread = 10.0
|
||||
orbit_velocity_min = 0.01
|
||||
orbit_velocity_max = 0.2
|
||||
gravity = Vector3(0, 0, 0)
|
||||
radial_accel_min = -500.0
|
||||
radial_accel_max = -500.0
|
||||
scale_min = 0.1
|
||||
scale_max = 0.3
|
||||
scale_curve = SubResource("CurveTexture_f1cta")
|
||||
hue_variation_min = -0.01
|
||||
hue_variation_max = 0.01
|
||||
anim_speed_min = 1.0
|
||||
anim_speed_max = 1.0
|
||||
turbulence_enabled = true
|
||||
turbulence_noise_strength = 10.0
|
||||
turbulence_noise_scale = 0.3
|
||||
turbulence_noise_speed = Vector3(1, 0, 0)
|
||||
turbulence_noise_speed_random = 0.83
|
||||
turbulence_influence_min = 0.0
|
||||
turbulence_influence_max = 0.069
|
||||
|
||||
[sub_resource type="Animation" id="Animation_whisc"]
|
||||
resource_name = "attackSegment0"
|
||||
length = 0.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(298, 354)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles2D:process_material:radial_accel_min")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [-500.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("GPUParticles2D:process_material:radial_accel_max")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [-500.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("GPUParticles2D:speed_scale")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("GPUParticles2D:process_material:initial_velocity_min")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("GPUParticles2D:process_material:initial_velocity_max")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("GPUParticles2D:process_material:orbit_velocity_min")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.01]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("GPUParticles2D:process_material:orbit_velocity_max")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.2]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("GPUParticles2D:process_material:turbulence_enabled")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/9/type = "value"
|
||||
tracks/9/imported = false
|
||||
tracks/9/enabled = true
|
||||
tracks/9/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/9/interp = 1
|
||||
tracks/9/loop_wrap = true
|
||||
tracks/9/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [25]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_btcxw"]
|
||||
resource_name = "attackSegment1"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [25, 30]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1m0sq"]
|
||||
resource_name = "attackSegment2"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:process_material:scale_min")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.1, 0.2]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles2D:process_material:scale_max")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.3, 0.4]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [30, 40]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_tuh2j"]
|
||||
resource_name = "attackSegment3"
|
||||
length = 0.15
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:process_material:scale_min")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.2]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles2D:process_material:scale_max")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.3]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [40]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3rbnj"]
|
||||
resource_name = "attackSegment4"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:process_material:radial_accel_min")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [-500.0, 0.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles2D:process_material:radial_accel_max")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [-500.0, 0.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("GPUParticles2D:process_material:orbit_velocity_min")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("GPUParticles2D:process_material:orbit_velocity_max")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("GPUParticles2D:process_material:turbulence_enabled")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("GPUParticles2D:process_material:initial_velocity_min")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [650.0]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("GPUParticles2D:process_material:initial_velocity_max")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [850.0]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0.1),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [50]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jpbb4"]
|
||||
resource_name = "attackInverse0"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_nbfl1"]
|
||||
resource_name = "attackInverse1"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jratu"]
|
||||
resource_name = "attackInverse2"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ho3ab"]
|
||||
resource_name = "attackInverse3"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_xvjql"]
|
||||
resource_name = "attackInverse4"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_lrc75"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GPUParticles2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(298, 354)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("GPUParticles2D:process_material:radial_accel_min")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [-500.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("GPUParticles2D:process_material:radial_accel_max")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [-500.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("GPUParticles2D:speed_scale")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("GPUParticles2D:process_material:initial_velocity_max")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("GPUParticles2D:process_material:initial_velocity_min")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("GPUParticles2D:process_material:scale_min")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.1]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("GPUParticles2D:process_material:scale_max")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.3]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("GPUParticles2D:process_material:orbit_velocity_min")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.01]
|
||||
}
|
||||
tracks/9/type = "value"
|
||||
tracks/9/imported = false
|
||||
tracks/9/enabled = true
|
||||
tracks/9/path = NodePath("GPUParticles2D:process_material:orbit_velocity_max")
|
||||
tracks/9/interp = 1
|
||||
tracks/9/loop_wrap = true
|
||||
tracks/9/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.2]
|
||||
}
|
||||
tracks/10/type = "value"
|
||||
tracks/10/imported = false
|
||||
tracks/10/enabled = true
|
||||
tracks/10/path = NodePath("GPUParticles2D:process_material:turbulence_enabled")
|
||||
tracks/10/interp = 1
|
||||
tracks/10/loop_wrap = true
|
||||
tracks/10/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/11/type = "value"
|
||||
tracks/11/imported = false
|
||||
tracks/11/enabled = true
|
||||
tracks/11/path = NodePath("GPUParticles2D:amount")
|
||||
tracks/11/interp = 1
|
||||
tracks/11/loop_wrap = true
|
||||
tracks/11/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [25]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5xdsw"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_lrc75"),
|
||||
"attackInverse0": SubResource("Animation_jpbb4"),
|
||||
"attackInverse1": SubResource("Animation_nbfl1"),
|
||||
"attackInverse2": SubResource("Animation_jratu"),
|
||||
"attackInverse3": SubResource("Animation_ho3ab"),
|
||||
"attackInverse4": SubResource("Animation_xvjql"),
|
||||
"attackSegment0": SubResource("Animation_whisc"),
|
||||
"attackSegment1": SubResource("Animation_btcxw"),
|
||||
"attackSegment2": SubResource("Animation_1m0sq"),
|
||||
"attackSegment3": SubResource("Animation_tuh2j"),
|
||||
"attackSegment4": SubResource("Animation_3rbnj")
|
||||
}
|
||||
|
||||
[node name="icyWindAnim" type="Node2D"]
|
||||
script = ExtResource("1_aonld")
|
||||
finalIndex = 5
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
||||
material = SubResource("CanvasItemMaterial_ebtcy")
|
||||
position = Vector2(298, 354)
|
||||
amount = 25
|
||||
process_material = SubResource("ParticleProcessMaterial_7lscu")
|
||||
texture = ExtResource("2_onmly")
|
||||
lifetime = 3.0
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_5xdsw")
|
||||
}
|
||||
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="animFinished"]
|
@ -1,56 +1,162 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://c44hesqr12wxd"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://c44hesqr12wxd"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Animations/rockThrowAnim.gd" id="1_owh0v"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwsd0hggrxbdq" path="res://Sprites/Animations/Rock Pack/Rocks 64x64 by Captainskeleto.png" id="2_addwy"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_gdix6"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 371, 664, 0, 0, 0, 0, 370, 481, 0, 0, 0, 0, 373, 311, 0, 0, 0, 0, 882, 362)
|
||||
}
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_m36l3"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 30, 39, 0, 0, 0, 0, 69, 45, 0, 0, 0, 0, 114, 61, 0, 0, 0, 0, 164, 98, 0, 0, 0, 0, 217, 179, 0, 0, 0, 0, 258, 318, 0, 0, 0, 0, 272, 436, 0, 0, 0, 0, 281, 600)
|
||||
}
|
||||
point_count = 8
|
||||
[ext_resource type="Resource" uid="uid://dl6nv6lp460n3" path="res://Resources/Spells/rockThrow.tres" id="2_apcu7"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wqvpx"]
|
||||
atlas = ExtResource("2_addwy")
|
||||
region = Rect2(128, 192, 64, 64)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7dh1k"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(342, 645)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5o8xe"]
|
||||
resource_name = "attackInverse0"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(760, 645), Vector2(760, 440)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_clfp2"]
|
||||
resource_name = "attackInverse1"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(760, 440), Vector2(760, 280)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hypvd"]
|
||||
resource_name = "attackInverse2"
|
||||
length = 0.23
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(760, 280), Vector2(342, 331)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_cfsn4"]
|
||||
resource_name = "attackSegment0"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = false
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 2,
|
||||
"values": [Vector2(342, 645), Vector2(342, 440)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_uphdx"]
|
||||
resource_name = "attackSegment1"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(342, 440), Vector2(342, 280)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_mlgwv"]
|
||||
resource_name = "attackSegment2"
|
||||
length = 0.23
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("TextureRect:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.23),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(342, 280), Vector2(852, 331)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_y7nwk"]
|
||||
resource_name = "fail"
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cg24k"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_7dh1k"),
|
||||
"attackInverse0": SubResource("Animation_5o8xe"),
|
||||
"attackInverse1": SubResource("Animation_clfp2"),
|
||||
"attackInverse2": SubResource("Animation_hypvd"),
|
||||
"attackSegment0": SubResource("Animation_cfsn4"),
|
||||
"attackSegment1": SubResource("Animation_uphdx"),
|
||||
"attackSegment2": SubResource("Animation_mlgwv"),
|
||||
"fail": SubResource("Animation_y7nwk")
|
||||
}
|
||||
|
||||
[node name="RockThrowAnim" type="Node2D"]
|
||||
script = ExtResource("1_owh0v")
|
||||
finalIndex = 3
|
||||
spell = ExtResource("2_apcu7")
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="."]
|
||||
curve = SubResource("Curve2D_gdix6")
|
||||
|
||||
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
|
||||
position = Vector2(371, 664)
|
||||
rotates = false
|
||||
loop = false
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="Path2D/PathFollow2D"]
|
||||
position = Vector2(-32, -32)
|
||||
curve = SubResource("Curve2D_m36l3")
|
||||
|
||||
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D/PathFollow2D/Path2D"]
|
||||
position = Vector2(30, 39)
|
||||
rotation = 0.152649
|
||||
rotates = false
|
||||
loop = false
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Path2D/PathFollow2D"]
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -32.0
|
||||
offset_top = -32.0
|
||||
offset_right = 32.0
|
||||
offset_bottom = 32.0
|
||||
offset_left = 342.0
|
||||
offset_top = 645.0
|
||||
offset_right = 406.0
|
||||
offset_bottom = 709.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
pivot_offset = Vector2(31.8413, 32.0651)
|
||||
texture = SubResource("AtlasTexture_wqvpx")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_cg24k")
|
||||
}
|
||||
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="animFinished"]
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,50 +1,22 @@
|
||||
extends "res://Scripts/animationBase.gd"
|
||||
extends AnimationBase
|
||||
|
||||
@export var startPrimaryLoc: Vector2
|
||||
@export var startSecondaryLoc: Vector2
|
||||
@export var fullSize: float = 1
|
||||
@export var explodeDur: float = 0.2
|
||||
@onready var ballofayr: AnimatedSprite2D = $Path2D/PathFollow2D/AnimatedSprite2D
|
||||
@onready var path: PathFollow2D = $Path2D/PathFollow2D
|
||||
@onready var particles: GPUParticles2D = $Path2D/PathFollow2D/GPUParticles2D
|
||||
var dir: int = 1
|
||||
@onready var ballofayr: AnimatedSprite2D = $AnimatedSprite2D
|
||||
@onready var particles: GPUParticles2D = $GPUParticles2D
|
||||
|
||||
var exploding: bool = false
|
||||
var timer: float = 0
|
||||
var size: Vector2 = Vector2(0, 0)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if inverted:
|
||||
dir = -1
|
||||
ballofayr.position = startSecondaryLoc
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if !exploding:
|
||||
if (targetProg / finalProg < 0.3):
|
||||
timer = clampf(timer + delta, 0, clampf(targetProg / finalProg, 0, 0.25))
|
||||
path.progress_ratio = timer
|
||||
if (targetProg / finalProg < 0.9):
|
||||
ballofayr.scale = lerp(ballofayr.scale, Vector2((targetProg / finalProg) * fullSize, (targetProg / finalProg) * fullSize), delta * 2)
|
||||
if (targetProg / finalProg >= 0.9):
|
||||
timer = clampf(timer + delta, 0, targetProg / finalProg)
|
||||
path.progress_ratio = timer
|
||||
if path.progress_ratio == 1:
|
||||
explode()
|
||||
else:
|
||||
if (exploding):
|
||||
timer += delta
|
||||
if timer > explodeDur:
|
||||
self.free()
|
||||
self.queue_free()
|
||||
|
||||
func setProgress(target: float, final: float = finalProg) -> void:
|
||||
targetProg = target
|
||||
finalProg = final
|
||||
|
||||
func explode() -> void:
|
||||
func die() -> void:
|
||||
particles.position = ballofayr.position
|
||||
ballofayr.hide()
|
||||
particles.emitting = true
|
||||
exploding = true
|
||||
timer = 0
|
||||
|
||||
func castFailed() -> void:
|
||||
explode()
|
||||
|
@ -1,11 +1,17 @@
|
||||
extends "res://Scripts/animationBase.gd"
|
||||
|
||||
@onready var texture: AnimatedSprite2D = $AnimatedSprite2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass
|
||||
var exploding: bool = false
|
||||
|
||||
func animFinished(_s: String):
|
||||
if (!exploding && index == finalIndex):
|
||||
animationFinished.emit(spell)
|
||||
die()
|
||||
elif (exploding):
|
||||
queue_free()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
func die() -> void:
|
||||
exploding = true
|
||||
animationPlayer.stop()
|
||||
animationPlayer.play("die")
|
||||
|
7
Scripts/Animations/icyWindAnim.gd
Normal file
7
Scripts/Animations/icyWindAnim.gd
Normal file
@ -0,0 +1,7 @@
|
||||
extends AnimationBase
|
||||
|
||||
@onready var particles: GPUParticles2D = $GPUParticles2D
|
||||
|
||||
func die():
|
||||
animationPlayer.play("RESET")
|
||||
queue_free()
|
@ -1,39 +1,9 @@
|
||||
extends "res://Scripts/animationBase.gd"
|
||||
extends AnimationBase
|
||||
|
||||
var path: PathFollow2D
|
||||
var failPath: PathFollow2D
|
||||
var casting: bool = true
|
||||
var timer: float = 0
|
||||
@onready var texture: TextureRect = $Path2D/PathFollow2D/TextureRect
|
||||
@onready var texture: TextureRect = $TextureRect
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if !inverted:
|
||||
path = $Path2D/PathFollow2D
|
||||
failPath = $Path2D/PathFollow2D/Path2D/PathFollow2D
|
||||
else:
|
||||
path = $Path2D/PathFollow2D
|
||||
failPath = $Path2D/PathFollow2D/Path2D/PathFollow2D
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if casting:
|
||||
if targetProg / finalProg < 0.7:
|
||||
timer = clampf(timer + delta, 0, clampf(targetProg / finalProg, 0, 0.35))
|
||||
path.progress_ratio = timer
|
||||
else:
|
||||
timer = clampf(timer + delta, 0, 1)
|
||||
path.progress_ratio = timer
|
||||
if path.progress_ratio == 1:
|
||||
self.free()
|
||||
else:
|
||||
timer = clampf(timer + (1.25 * delta), 0, 1)
|
||||
failPath.progress_ratio = timer
|
||||
if failPath.progress_ratio == 1:
|
||||
self.free()
|
||||
var failIndex: int = 0
|
||||
var animQueue: Queue = Queue.new()
|
||||
|
||||
func castFailed() -> void:
|
||||
casting = false
|
||||
texture.get_parent().remove_child(texture)
|
||||
failPath.add_child(texture)
|
||||
timer = 0
|
||||
queue_free()
|
||||
|
@ -6,10 +6,6 @@ extends GPUParticles2D
|
||||
func _ready():
|
||||
process_material.emission_box_extents = size
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func _on_mouse_entered():
|
||||
emitting = true
|
||||
|
||||
|
15
Scripts/Queue.gd
Normal file
15
Scripts/Queue.gd
Normal file
@ -0,0 +1,15 @@
|
||||
class_name Queue extends Object
|
||||
|
||||
var items: Array
|
||||
|
||||
func push(item):
|
||||
items.append(item)
|
||||
|
||||
func pop():
|
||||
return items.pop_front()
|
||||
|
||||
func peek():
|
||||
return items[0]
|
||||
|
||||
func size():
|
||||
return items.size()
|
@ -12,7 +12,7 @@ func home():
|
||||
titleScreen.show()
|
||||
|
||||
func changeDifficulty(i: int):
|
||||
data.difficulty = i
|
||||
data.difficulty = i as Data.Difficulty
|
||||
|
||||
func changeVolMaster(i: float):
|
||||
AudioServer.set_bus_volume_db(mainBus, linear_to_db(i))
|
||||
|
@ -16,14 +16,6 @@ extends Control
|
||||
|
||||
@export var arena: String
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func _on_play_pressed():
|
||||
var a: Node2D = load(arena).instantiate()
|
||||
$/root/Root.add_child(a)
|
||||
|
@ -1,14 +1,38 @@
|
||||
extends Node2D
|
||||
class_name AnimationBase extends Node2D
|
||||
|
||||
class_name AnimationBase
|
||||
signal animationFinished(spell: Spell)
|
||||
|
||||
@onready var animationPlayer: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
@export var inverted: bool = false
|
||||
@export var index: int = -1
|
||||
@export var finalIndex: int = 0
|
||||
@export var spell: Spell
|
||||
var attackName: String = "attackSegment"
|
||||
var inverseName: String = "attackInverse"
|
||||
|
||||
var targetProg: float
|
||||
var finalProg: float
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if inverted:
|
||||
attackName = inverseName
|
||||
|
||||
func castFailed() -> void:
|
||||
pass
|
||||
die()
|
||||
|
||||
func setProgress(target: float, final: float = finalProg) -> void:
|
||||
targetProg = target
|
||||
finalProg = final
|
||||
if (index > -1):
|
||||
animationPlayer.queue(attackName + str(index))
|
||||
index += 1
|
||||
|
||||
func animFinished(_s: String):
|
||||
if (index == finalIndex):
|
||||
animationFinished.emit(spell)
|
||||
die()
|
||||
|
||||
func die():
|
||||
queue_free()
|
||||
|
@ -23,9 +23,9 @@ var castProgress: int = 0
|
||||
func _ready():
|
||||
renderer.animation_finished.connect(animationFinished)
|
||||
renderer.play("idle")
|
||||
spellbook.initCooldowns()
|
||||
healthbar.maxHealth = maxHealth
|
||||
if !player:
|
||||
spellbook.initCooldowns()
|
||||
for spel: Spell in spellbook.spells:
|
||||
if (spel == null): continue
|
||||
if !data.animations.has(spel.animation):
|
||||
@ -60,117 +60,98 @@ func cast() -> void:
|
||||
match data.difficulty:
|
||||
Data.Difficulty.EASY:
|
||||
spellIndex = randi_range(0, spellbook.spells.size() - 1)
|
||||
spell = spellbook.spells[spellIndex]
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.inverted = true
|
||||
get_node("/root").add_child(anim)
|
||||
attemptCast()
|
||||
Data.Difficulty.NORMAL:
|
||||
spellIndex = randi_range(0, spellbook.spells.size() - 1)
|
||||
spell = spellbook.spells[spellIndex]
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.inverted = true
|
||||
get_node("/root").add_child(anim)
|
||||
attemptCast()
|
||||
Data.Difficulty.HARD:
|
||||
spellIndex = randi_range(0, spellbook.spells.size() - 1)
|
||||
spell = spellbook.spells[spellIndex]
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.inverted = true
|
||||
get_node("/root").add_child(anim)
|
||||
attemptCast()
|
||||
Data.Difficulty.GAMER:
|
||||
spellIndex = randi_range(0, spellbook.spells.size() - 1)
|
||||
spell = spellbook.spells[spellIndex]
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.inverted = true
|
||||
get_node("/root").add_child(anim)
|
||||
attemptCast()
|
||||
spell = spellbook.spells[spellIndex]
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.inverted = true
|
||||
anim.spell = spell
|
||||
anim.connect("animationFinished", finalizeSpell)
|
||||
get_node("/root").add_child(anim)
|
||||
attemptCast()
|
||||
|
||||
func attemptCast():
|
||||
#if (!casting):
|
||||
#_finishedCasting()
|
||||
#return
|
||||
match data.difficulty:
|
||||
Data.Difficulty.EASY:
|
||||
await get_tree().create_timer(randf_range(0.5, 1.5)).timeout
|
||||
await get_tree().create_timer(randf_range(0.75, 1.75)).timeout
|
||||
if (spell == null): return
|
||||
if randi_range(0, 99) < 90:
|
||||
castProgress += 1
|
||||
anim.setProgress(castProgress)
|
||||
if (is_instance_valid(anim)): anim.setProgress(castProgress)
|
||||
|
||||
if castProgress == spell.castCombo.size():
|
||||
if (castProgress == spell.castCombo.size()):
|
||||
casting = false
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
data.player.alterHealth(-spell.damage, false)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
casting = false
|
||||
anim.castFailed()
|
||||
castProgress = 0
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown * (float(castProgress) / float(spell.castCombo.size()))
|
||||
_finishedCasting()
|
||||
failCast()
|
||||
return
|
||||
Data.Difficulty.NORMAL:
|
||||
await get_tree().create_timer(randf_range(0.4, 1)).timeout
|
||||
await get_tree().create_timer(randf_range(0.6, 1.2)).timeout
|
||||
if (spell == null): return
|
||||
if randi_range(0, 99) < 95:
|
||||
castProgress += 1
|
||||
anim.setProgress(castProgress)
|
||||
if (is_instance_valid(anim)): anim.setProgress(castProgress)
|
||||
|
||||
if castProgress == spell.castCombo.size():
|
||||
if (castProgress == spell.castCombo.size()):
|
||||
casting = false
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
data.player.alterHealth(-spell.damage, false)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
casting = false
|
||||
anim.castFailed()
|
||||
castProgress = 0
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown * (float(castProgress) / float(spell.castCombo.size()))
|
||||
_finishedCasting()
|
||||
failCast()
|
||||
Data.Difficulty.HARD:
|
||||
await get_tree().create_timer(randf_range(0.2, 0.6)).timeout
|
||||
await get_tree().create_timer(randf_range(0.3, 0.75)).timeout
|
||||
if (spell == null): return
|
||||
if randi_range(0, 99) < 98:
|
||||
castProgress += 1
|
||||
anim.setProgress(castProgress)
|
||||
if (is_instance_valid(anim)): anim.setProgress(castProgress)
|
||||
|
||||
if castProgress == spell.castCombo.size():
|
||||
if (castProgress == spell.castCombo.size()):
|
||||
casting = false
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
data.player.alterHealth(-spell.damage, false)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
casting = false
|
||||
anim.castFailed()
|
||||
castProgress = 0
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown * (float(castProgress) / float(spell.castCombo.size()))
|
||||
_finishedCasting()
|
||||
failCast()
|
||||
Data.Difficulty.GAMER:
|
||||
await get_tree().create_timer(.1).timeout
|
||||
await get_tree().create_timer(.2).timeout
|
||||
if (spell == null): return
|
||||
castProgress += 1
|
||||
anim.setProgress(castProgress)
|
||||
if (is_instance_valid(anim)): anim.setProgress(castProgress)
|
||||
|
||||
if castProgress == spell.castCombo.size():
|
||||
if (castProgress == spell.castCombo.size()):
|
||||
casting = false
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
data.player.alterHealth(-spell.damage, false)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
|
||||
@ -181,7 +162,24 @@ func alterHealth(change: float, stun: bool) -> void:
|
||||
renderer.play("hit")
|
||||
if player:
|
||||
stunned.emit()
|
||||
else:
|
||||
failCast()
|
||||
healthChanged.emit(health)
|
||||
|
||||
func failCast() -> void:
|
||||
casting = false
|
||||
if (is_instance_valid(anim)): anim.castFailed()
|
||||
castProgress = 0
|
||||
if (spell != null): spellbook.cooldowns[spellIndex] = spell.cooldown * (float(castProgress) / float(spell.castCombo.size()))
|
||||
spell = null
|
||||
_finishedCasting()
|
||||
return
|
||||
|
||||
func animationFinished() -> void:
|
||||
renderer.play("idle")
|
||||
|
||||
func finalizeSpell(finish: Spell) -> void:
|
||||
if (player):
|
||||
data.opponent.alterHealth(-finish.damage, finish.stunning)
|
||||
else:
|
||||
data.player.alterHealth(-finish.damage, finish.stunning)
|
||||
|
@ -1,6 +1,4 @@
|
||||
extends Node
|
||||
|
||||
class_name Data
|
||||
class_name Data extends Node
|
||||
|
||||
enum Element{
|
||||
NORMAL,
|
||||
|
@ -1,5 +1,5 @@
|
||||
extends RichTextLabel
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _physics_process(delta):
|
||||
func _physics_process(_delta):
|
||||
text = "FPS: " + str(Engine.get_frames_per_second())
|
||||
|
@ -3,5 +3,11 @@ class_name HealthBar extends Control
|
||||
@onready var bar: ColorRect = $ColorRect2
|
||||
@export var maxHealth: float = 1
|
||||
|
||||
var barSize: Vector2 = Vector2(20, 100)
|
||||
var tween: Tween
|
||||
|
||||
func healthChanged(health) -> void:
|
||||
bar.size.y = (health / maxHealth) * 100
|
||||
if (tween): tween.kill()
|
||||
tween = create_tween()
|
||||
barSize.y = (health / maxHealth) * 100
|
||||
tween.tween_property(bar, "size", barSize, 0.3)
|
||||
|
@ -31,8 +31,12 @@ func _process(delta):
|
||||
spellIndex = i
|
||||
castIndicator.show()
|
||||
castIndicator.setDirs(spell.castCombo[0], spell.castCombo[1])
|
||||
print(spell.animation)
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
print(anim.name)
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.spell = spell
|
||||
anim.connect("animationFinished", avatar.finalizeSpell)
|
||||
get_node("/root").add_child(anim)
|
||||
timer = 0
|
||||
else:
|
||||
@ -52,21 +56,19 @@ func _process(delta):
|
||||
avatar.renderer.play("attack1")
|
||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
castIndicator.hide()
|
||||
data.opponent.alterHealth(-spell.damage, false)
|
||||
elif (timer >= spell.timeout || Input.is_action_just_pressed("up") || Input.is_action_just_pressed("down") || Input.is_action_just_pressed("left") || Input.is_action_just_pressed("right")):
|
||||
avatar.alterHealth(-spell.backfireStrength, true)
|
||||
casting = false
|
||||
anim.castFailed()
|
||||
avatar.castProgress = 0
|
||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown * (float(avatar.castProgress) / float(spell.castCombo.size()))
|
||||
castIndicator.hide()
|
||||
stunned()
|
||||
|
||||
for i in range(data.spellbook.cooldowns.size()):
|
||||
data.spellbook.cooldowns[i] -= delta
|
||||
if data.spellbook.cooldowns[i] < 0: data.spellbook.cooldowns[i] = 0
|
||||
|
||||
func stunned():
|
||||
if (!casting): return
|
||||
casting = false
|
||||
avatar.castProgress = 0
|
||||
anim.castFailed()
|
||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown * (float(avatar.castProgress) / float(spell.castCombo.size()))
|
||||
castIndicator.hide()
|
||||
spell = null
|
||||
|
@ -19,7 +19,7 @@ config/icon="res://icon.svg"
|
||||
|
||||
window/size/mode=3
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="keep_width"
|
||||
window/stretch/aspect="keep_height"
|
||||
mouse_cursor/custom_image_hotspot=Vector2(64, 128)
|
||||
|
||||
[dotnet]
|
||||
|
Loading…
x
Reference in New Issue
Block a user