Update everything to the latest.

This commit is contained in:
Relintai 2020-01-04 04:16:52 +01:00
parent 2adb7fa8c0
commit bb8dad5d46
40 changed files with 104 additions and 119 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": "48edf6333029fc961528892af190201197b44c40", "world_generator": "58e38c07bd798a44232ecdfe02db038e3c434239", "entity_spell_system": "e9a7a92fb289ba1927a1b74c27eeb4d776e7a4a1", "ui_extensions": "271dcf89e9afe5cb6350de2f2433c8ebf8aba785", "texture_packer": "604c330188e220c15d10ea5bd545a6fc5aab0132", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}
{"engine": "94658de1ffab02ad2eacbadf44f86c3654e3afcb", "world_generator": "459538d6b94b8c6ce6ece4cb626dabd6ae06fbc8", "entity_spell_system": "413031fb3c88cbede25c929fec85dfc673d36c45", "ui_extensions": "8a81cc53100c5a138fbaf927080410025c64c88e", "texture_packer": "189810d1648cd72e486b357c4523b4eb2a0d71f3", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}

View File

@ -66,7 +66,7 @@ remote func creceive_spawn_for(data: String, global_name : String, position: Vec
entity.name = str(global_name)
entity.from_dict(parse_json(data))
entity.translation = position
entity.get_body().translation = position
Logger.info("Player spawned ")
@ -92,7 +92,7 @@ func spawn_networked_player_from_data(data : String, position : Vector2, network
entity.from_dict(parse_json(data))
entity.set_network_master(network_owner)
entity.translation = position
entity.get_body().translation = position
Logger.info("Player spawned ")
@ -112,7 +112,7 @@ puppet func spawn_owned_player(data : String, position : Vector2) -> void:
entity.from_dict(parse_json(data))
entity.name = str(multiplayer.get_network_unique_id())
entity.translation = position
entity.get_body().translation = position
entity.set_network_master(multiplayer.get_network_unique_id())
Logger.info("Player spawned ")
@ -142,7 +142,7 @@ func load_player(file_name : String, position : Vector2, network_owner : int) ->
entity.from_dict(load_file(file_name))
entity.position = position
entity.get_body().position = position
# entity.initialize(createinfo)
entity.set_network_master(network_owner)
@ -302,7 +302,7 @@ func spawn(createinfo : EntityCreateInfo, networked : bool, position : Vector2,
spawn_parent.add_child(entity_node)
entity_node.owner = spawn_parent
entity_node.position = position
entity_node.get_body().position = position
entity_node.initialize(createinfo)

View File

@ -216,4 +216,4 @@ func set_terrarin_player():
var terrarin : Spatial = get_node("/root/GameScene/VoxelWorld")
terrarin.set_player(local_player_master.player as Node2D)
terrarin.set_player(local_player_master.player.get_body() as Node2D)

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://player/CharacterSkeleton2D.gd" type="Script" id=1]
[ext_resource path="res://player/CharacterSkeleton2DGD.gd" type="Script" id=1]
[ext_resource path="res://characters/CharacterSideModel.tscn" type="PackedScene" id=2]
[ext_resource path="res://characters/CharacterFrontModel.tscn" type="PackedScene" id=3]
[ext_resource path="res://scripts/item_visuals/CharacterAtlas2D.gd" type="Script" id=4]
@ -45,7 +45,7 @@ HUMANOID_BONES_MAX = 16,"
texture = ExtResource( 6 )
slots = [ null, SubResource( 1 ), null, null, null, null, null, null, null, null, null, null, null, null, SubResource( 2 ), null ]
[node name="Character" type="CharacterSkeleton"]
[node name="Character" type="CharacterSkeleton2D"]
script = ExtResource( 1 )
front_node_path = NodePath("CharacterFrontModel")
front_animation_player_path = NodePath("../Character/CharacterFrontModel/AnimationPlayer")

View File

@ -18,9 +18,8 @@ text_name = "Aspect of Scorpions"
text_description = "Range: 26m.
Casttime: {3}.
Deals 340 to 380 damage every 3 sec, and increases damage taken by 10% for 30 sec."
range = true
range_range = 26.0
cast = true
cast_enabled = true
cast_cast_time = 1.2
training_required_spell = ExtResource( 5 )
script = ExtResource( 1 )

View File

@ -16,7 +16,6 @@ text_name = "Aspect of Wasps"
text_description = "Range: 26m.
Instant.
Deals 230 to 270 damage every 3 sec, this damage increases over the duration, for 21 sec."
range = true
range_range = 26.0
aoe_targetType = 541
aoe_colliderType = 541

View File

@ -16,7 +16,6 @@ target_aura_applys = [ ExtResource( 3 ) ]
text_name = "Aspect of Wolves"
text_description = "Range: 26m.
Deals 280 to 330 damage every 2 sec, and reduces melee and spell damage by 10% for 22 sec."
range = true
range_range = 26.0
aoe_targetType = 1129071960
aoe_colliderType = 1058050193

View File

@ -19,7 +19,6 @@ Instant.
Cooldown: {2}
Deals 460 to 540 damage every 3 sec, healing you for 80% of the damage."
cooldown_cooldown = 21.0
range = true
range_range = 26.0
aoe_targetType = -1910718371
aoe_colliderType = -298046312

View File

@ -25,11 +25,8 @@ text_name = "Amplify Pain"
text_description = "Range: 26m.
Casttime: {3}.
Causes your damage over time effects to tick."
range = true
range_range = 26.0
cast = true
cast_cast_time = 1.5
damage = true
damage_type = 16
damage_min = 130
damage_max = 150

View File

@ -17,7 +17,6 @@ text_name = "Close Wounds"
text_description = "Casttime: 2 sec.
Cooldown: {2}
Heals you for 720 to 780 every 3 sec for 21 sec."
cast = true
cast_cast_time = 1.3
aoe_colliderType = -2147479552
script = ExtResource( 1 )

View File

@ -18,7 +18,6 @@ text_description = "Instant.
Cooldown: {2}
Reduces damage taken by 70%. This spell is not on the global cooldown."
cooldown_cooldown = 60.0
cooldown_global_cooldown = false
aoe_targetType = -1910718371
aoe_colliderType = -298046312
script = ExtResource( 1 )

View File

@ -18,7 +18,6 @@ text_description = "Instant.
Cooldown: {2}
Increases your movement speed by 60% for 6 sec. This spell is not on the global cooldown."
cooldown_cooldown = 20.0
cooldown_global_cooldown = false
aoe_targetType = 520
aoe_colliderType = 186459648
script = ExtResource( 3 )

View File

@ -15,7 +15,6 @@ text_description = "Instant.
Cooldown: {2}
Roots every enemy around you in a 15m radius for 8 sec. This spell doesn't have diminishing return."
cooldown_cooldown = 24.0
range = true
range_range = 15.0
aoe = true
aoe_targetType = -572653568

View File

@ -11,7 +11,6 @@ rank = 1
icon = ExtResource( 2 )
needs_target = true
text_name = "adadadadadad"
damage = true
damage_min = 200
damage_max = 300
aoe_targetType = 1431112251

View File

@ -16,8 +16,6 @@ text_description = "Range: 26m.
Casttime: 1.5 sec.
Cooldown: {2}
Roots the target for 8 sec."
range = true
cast = true
cast_cast_time = 1.4
aoe_targetType = 8
aoe_colliderType = 537722880

View File

@ -17,7 +17,6 @@ text_description = "Instant.
Cooldown: {2}
Heals you for 6700 to 7000."
cooldown_cooldown = 150.0
heal = true
heal_min = 6700
heal_max = 7000
aoe_targetType = 5

View File

@ -14,7 +14,6 @@ text_name = "Inner Will"
text_description = "Cooldown: 1.5 min.
Removes any movement impairing effects, stuns, and effects which makes you lose control of your character. This spell is not on the global cooldown."
cooldown_cooldown = 90.0
cooldown_global_cooldown = false
aoe_targetType = 7
aoe_colliderType = 480
script = ExtResource( 1 )

View File

@ -17,9 +17,8 @@ text_name = "Aspect of Scorpions"
text_description = "Range: 26m.
Casttime: {3}.
Deals 340 to 380 damage every 3 sec, and increases damage taken by 10% for 30 sec."
range = true
range_range = 26.0
cast = true
cast_enabled = true
cast_cast_time = 1.2
spell_cooldown_mainpulation_data_count = -1
script = ExtResource( 2 )

View File

@ -15,7 +15,6 @@ text_name = "Aspect of Wasps"
text_description = "Range: 26m.
Instant.
Deals 230 to 270 damage every 3 sec, this damage increases over the duration, for 21 sec."
range = true
range_range = 26.0
aoe_targetType = 541
aoe_colliderType = 541

View File

@ -15,7 +15,6 @@ target_aura_applys = [ ExtResource( 2 ) ]
text_name = "Aspect of Wolves"
text_description = "Range: 26m.
Deals 280 to 330 damage every 2 sec, and reduces melee and spell damage by 10% for 22 sec."
range = true
range_range = 26.0
aoe_targetType = 1129071960
aoe_colliderType = 1058050193

View File

@ -19,7 +19,6 @@ Instant.
Cooldown: {2}
Deals 460 to 540 damage every 3 sec, healing you for 80% of the damage."
cooldown_cooldown = 21.0
range = true
range_range = 26.0
aoe_targetType = -1910718371
aoe_colliderType = -298046312

View File

@ -26,11 +26,8 @@ text_name = "Overload"
text_description = "Range: 26m.
Channeled. Free.
Causes your dots to deal 10% more damage."
range = true
range_range = 26.0
cast = true
cast_cast_time = 1.5
damage = true
damage_type = 16
damage_min = 130
damage_max = 150

View File

@ -148,7 +148,7 @@
{
"folder":"res://data/models/",
"name":"Character Models",
"type":"CharacterSkeleton"
"type":"CharacterSkeleton2D"
},
{
"folder":"res://data/fonts/",

View File

@ -91,7 +91,7 @@ func spawn():
# Entities.spawn_mob(1, 50, Vector3(76, 6, 54))
func set_terrarin_player():
terrarin.set_player(player as Node2D)
terrarin.set_player(player.get_body() as Node2D)
func _on_host_button_clicked():
get_tree().connect("network_peer_connected", self, "_network_peer_connected")

View File

@ -1,5 +1,5 @@
extends CharacterSkeleton
class_name CharacterSkeleton2D
extends CharacterSkeleton2D
class_name CharacterSkeleton2DGD
# Copyright Péter Magyar relintai@gmail.com
# MIT License, functionality from this class needs to be protable to the entity spell system

View File

@ -175,9 +175,9 @@ func process_movement(delta : float) -> void:
if get_tree().network_peer:
if get_tree().is_network_server():
rset_position(position, rotation)
rset_position(get_body().position, get_body().rotation)
else:
rpc("set_position", position, rotation)
rpc("set_position", get_body().position, get_body().rotation)
func _input(event: InputEvent) -> void:
if not cursor_grabbed:
@ -272,7 +272,7 @@ func target(position : Vector2):
var from = camera.project_ray_origin(position)
var to = from + camera.project_ray_normal(position) * ray_length
var space_state = get_world_2d().direct_space_state
var space_state = get_body().get_world_2d().direct_space_state
var result = space_state.intersect_ray(from, to, [], 2)
if result:
@ -291,7 +291,7 @@ func cmouseover(event):
var from = camera.project_ray_origin(event.position)
var to = from + camera.project_ray_normal(event.position) * ray_length
var space_state = get_world_2d().direct_space_state
var space_state = get_body().get_world_2d().direct_space_state
var result = space_state.intersect_ray(from, to, [], 2)
if result:

View File

@ -5,20 +5,21 @@
[node name="DisplayPlayer" type="Entity" groups=[
"players",
]]
collision_layer = 3
collision_mask = 3
character_skeleton_path = NodePath("Rotation_Helper/Model/character")
body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Rotation_Helper/Model")
sseed = 9240987
cseed = 9240987
script = ExtResource( 1 )
[node name="Rotation_Helper" type="Spatial" parent="."]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="Rotation_Helper" type="Spatial" parent="KinematicBody2D"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.960532, 0 )
__meta__ = {
"_editor_description_": ""
}
[node name="Model" type="Spatial" parent="Rotation_Helper"]
[node name="Model" type="Spatial" parent="KinematicBody2D/Rotation_Helper"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.875205, 0 )
__meta__ = {
"_editor_description_": ""

View File

@ -78,17 +78,17 @@ func _process(delta : float) -> void:
frame = 0
# print(get_tree().root.get_visible_rect())
var vpos : Vector2 = -get_tree().root.canvas_transform.get_origin() - position
var vpos : Vector2 = -get_tree().root.canvas_transform.get_origin() - get_body().position
var l : float = vpos.length_squared()
var rs : float = get_tree().root.size.x * get_tree().root.size.x
if l < rs:
if not visible:
show()
if not get_body().visible:
get_body().show()
set_physics_process(true)
else:
if visible:
hide()
if get_body().visible:
get_body().hide()
set_physics_process(false)
@ -105,16 +105,16 @@ func _physics_process(delta : float) -> void:
process_movement(delta)
func move_along_path(distance : float) -> void:
var start_point : = position
var start_point : Vector2 = get_body().position
for i in range(path.size()):
var distance_to_next : = start_point.distance_to(path[0])
if distance <= distance_to_next and distance >= 0.0:
position = start_point.linear_interpolate(path[0], distance / distance_to_next)
get_body().position = start_point.linear_interpolate(path[0], distance / distance_to_next)
break
elif distance <= 0.0:
position = path[0]
get_body().position = path[0]
follow_path = false
break
@ -181,9 +181,9 @@ func process_movement(delta : float) -> void:
return
vel = hvel
vel = move_and_slide(vel)
vel = get_body().move_and_slide(vel)
sset_position(position, rotation)
sset_position(get_body().position, get_body().rotation)
func sstart_attack(entity : Entity) -> void:
@ -244,10 +244,10 @@ func _son_damage_dealt(data):
func _con_damage_dealt(info : SpellDamageInfo) -> void:
# if info.dealer ==
WorldNumbers.damage(position, 90, info.damage, info.crit)
WorldNumbers.damage(get_body().position, 90, info.damage, info.crit)
func _con_heal_dealt(info : SpellHealInfo) -> void:
WorldNumbers.heal(position, 90, info.heal, info.crit)
WorldNumbers.heal(get_body().position, 90, info.heal, info.crit)
func _moved() -> void:
if sis_casting():
@ -328,6 +328,6 @@ func sset_position(pposition : Vector2, protation : float) -> void:
vrpc("cset_position", pposition, protation)
remote func cset_position(pposition : Vector2, protation : float) -> void:
position = pposition
rotation = protation
get_body().position = pposition
get_body().rotation = protation

View File

@ -10,12 +10,15 @@ radius = 20.0
[node name="Mob" type="Entity" groups=[
"mobs",
]]
character_skeleton_path = NodePath("Character")
body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Character")
script = ExtResource( 2 )
[node name="NamePlate" parent="." instance=ExtResource( 3 )]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="Character" parent="." instance=ExtResource( 1 )]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
shape = SubResource( 1 )
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 1 )]
[node name="NamePlate" parent="KinematicBody2D" instance=ExtResource( 3 )]

View File

@ -51,7 +51,7 @@ func _ready():
health_bar = get_node(health_bar_path) as TextureProgress
health_bar_label = get_node(health_bar_label_path) as Label
entity = get_node("..") as Entity
entity = get_node("../..") as Entity
health = entity.get_health()
health.connect("c_changed", self, "c_health_changed")
@ -84,7 +84,7 @@ func _process(delta):
interpolating = false
var position : Vector2 = entity.position
var position : Vector2 = entity.get_body().position
position = get_global_transform().xform_inv(position)

View File

@ -110,8 +110,8 @@ remote func cset_position(pposition : Vector2, protation : float) -> void:
# if get_network_master() != 1:
# print(str(get_network_master()) + "npcset")
position = pposition
rotation = protation
get_body().position = pposition
get_body().rotation = protation
func _moved() -> void:
if sis_casting():

View File

@ -8,14 +8,15 @@
radius = 20.0
[node name="NetworkedPlayer" type="Entity"]
collision_layer = 3
collision_mask = 3
character_skeleton_path = NodePath("Character")
body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Character")
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
[node name="NamePlate" parent="." instance=ExtResource( 3 )]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
shape = SubResource( 1 )
[node name="Character" parent="." instance=ExtResource( 2 )]
[node name="NamePlate" parent="." instance=ExtResource( 3 )]
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 2 )]

View File

@ -140,13 +140,13 @@ func process_movement(delta : float) -> void:
hvel = hvel.linear_interpolate(target, accel*delta)
vel = hvel
vel = move_and_slide(vel)
vel = get_body().move_and_slide(vel)
if multiplayer.has_network_peer():
if not multiplayer.is_network_server():
rpc_id(1, "sset_position", position)
rpc_id(1, "sset_position", get_body().position)
else:
sset_position(position)
sset_position(get_body().position)
func _input(event: InputEvent) -> void:
if not cursor_grabbed:
@ -189,7 +189,7 @@ func _unhandled_input(event: InputEvent) -> void:
mouse_left_down = event.pressed
if mouse_left_down:
mouse_dir = (event.position - get_viewport_rect().size / 2).normalized()
mouse_dir = (event.position - get_body().get_viewport_rect().size / 2).normalized()
else:
mouse_dir = Vector2()
@ -210,18 +210,18 @@ func _unhandled_input(event: InputEvent) -> void:
target(event.position)
if event is InputEventMouseMotion and mouse_left_down and event.device != -1:
mouse_dir = (event.position - get_viewport_rect().size / 2).normalized()
mouse_dir = (event.position - get_body().get_viewport_rect().size / 2).normalized()
func target(position : Vector2):
var space_state = get_world_2d().direct_space_state
var results = space_state.intersect_point(world.make_canvas_position_local(position), 32, [], get_collision_layer())
var space_state = get_body().get_world_2d().direct_space_state
var results = space_state.intersect_point(world.make_canvas_position_local(position), 32, [], get_body().get_collision_layer())
#var results = space_state.intersect_point(position, 32, [], 2)
if results:
for result in results:
if result.collider and result.collider is Entity:
crequest_target_change((result.collider as Node).get_path())
if result.collider and result.collider.owner is Entity:
crequest_target_change((result.collider.owner as Node).get_path())
return
crequest_target_change(NodePath())
@ -230,14 +230,14 @@ func target(position : Vector2):
func cmouseover(event):
var space_state = get_world_2d().direct_space_state
var results = space_state.intersect_point(world.make_canvas_position_local(position), 32, [], get_collision_layer())
var space_state = get_body().get_world_2d().direct_space_state
var results = space_state.intersect_point(world.make_canvas_position_local(get_body().position), 32, [], get_body().get_collision_layer())
#var results = space_state.intersect_point(position, 32, [], 2)
if results:
for result in results:
if result.collider and result.collider is Entity:
var mo : Entity = result.collider as Entity
if result.collider and result.collider.owner is Entity:
var mo : Entity = result.collider.owner as Entity
if last_mouse_over != null and last_mouse_over != mo:
if is_instance_valid(last_mouse_over):
@ -276,7 +276,7 @@ remote func cset_position(pposition : Vector2) -> void:
if get_network_master() != 1:
print(str(get_network_master()) + " pcset")
position = pposition
get_body().position = pposition
func _moved() -> void:
if sis_casting():

View File

@ -10,16 +10,19 @@ radius = 8.0
[node name="Player" type="Entity" groups=[
"players",
]]
character_skeleton_path = NodePath("Character")
body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Character")
script = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Camera" type="Camera2D" parent="."]
current = true
[node name="GUILayer" parent="." instance=ExtResource( 3 )]
[node name="Character" parent="." instance=ExtResource( 1 )]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 1 )]
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
shape = SubResource( 1 )
[node name="Camera" type="Camera2D" parent="KinematicBody2D"]
current = true
[connection signal="onc_open_loot_winow_request" from="." to="GUILayer" method="_on_Player_onc_open_loot_winow_request"]

View File

@ -49,10 +49,10 @@ func _physics_process(delta):
update_visibility()
func update_visibility() -> void:
_query.collision_layer = get_collision_layer()
_query.collision_layer = get_body().get_collision_layer()
_query.transform = Transform2D(0, position)
var res : Array = get_world_2d().direct_space_state.intersect_shape(_query)
_query.transform = Transform2D(0, get_body().position)
var res : Array = get_body().get_world_2d().direct_space_state.intersect_shape(_query)
#warning-ignore:unassigned_variable
var currenty_sees : Array = Array()
@ -104,6 +104,6 @@ func update_visibility() -> void:
remote func set_position_remote(pos : Vector2) -> void:
if get_tree().is_network_server():
rpc("set_position_remote", pos)
print(position)
position = pos
#print(position)
get_body().position = pos

View File

@ -29,10 +29,10 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://player/CharacterSkeletonAttachPoint.gd"
}, {
"base": "CharacterSkeleton",
"class": "CharacterSkeleton2D",
"base": "CharacterSkeleton2D",
"class": "CharacterSkeleton2DGD",
"language": "GDScript",
"path": "res://player/CharacterSkeleton2D.gd"
"path": "res://player/CharacterSkeleton2DGD.gd"
}, {
"base": "Entity",
"class": "DisplayPlayerGD",
@ -129,7 +129,7 @@ _global_script_class_icons={
"CharacterAtlas2D": "",
"CharacterAtlasEntry2D": "",
"CharacterSkeketonAttachPoint": "",
"CharacterSkeleton2D": "",
"CharacterSkeleton2DGD": "",
"DisplayPlayerGD": "",
"EntityAIGD": "",
"EntityDataGD": "",

View File

@ -117,7 +117,7 @@ func attack(delta):
owner.target_movement_direction = Vector2()
return
var dir : Vector2 = target.position - owner.position
var dir : Vector2 = target.get_body().position - owner.get_body().position
owner.target_movement_direction = dir

View File

@ -27,13 +27,13 @@ export(Rect2) var right_rect : Rect2
export(Rect2) var left_rect : Rect2
func get_index(facing : int) -> Rect2:
if facing == CharacterSkeleton2D.CharacterFacing.FACING_FRONT:
if facing == CharacterSkeleton2DGD.CharacterFacing.FACING_FRONT:
return front_rect
if facing == CharacterSkeleton2D.CharacterFacing.FACING_BACK:
if facing == CharacterSkeleton2DGD.CharacterFacing.FACING_BACK:
return back_rect
if facing == CharacterSkeleton2D.CharacterFacing.FACING_RIGHT:
if facing == CharacterSkeleton2DGD.CharacterFacing.FACING_RIGHT:
return right_rect
if facing == CharacterSkeleton2D.CharacterFacing.FACING_LEFT:
if facing == CharacterSkeleton2DGD.CharacterFacing.FACING_LEFT:
return left_rect
return front_rect

View File

@ -25,13 +25,13 @@ func _sstart_casting(info : SpellCastInfo) -> void:
if info.caster.sis_casting():
return
if info.spell.cooldown_global_cooldown and info.caster.gets_has_global_cooldown() or info.caster.hass_category_cooldown(spell_type) or info.caster.hass_cooldown(id):
if cooldown_global_cooldown_enabled and info.caster.gets_has_global_cooldown() or info.caster.hass_category_cooldown(spell_type) or info.caster.hass_cooldown(id):
return
if !info.caster.hass_spell(self):
return
if cast:
if cast_enabled:
info.caster.sstart_casting(info)
return
@ -102,7 +102,7 @@ func handle_effect(info : SpellCastInfo) -> void:
elif target_type == SPELL_TARGET_TYPE_SELF:
info.target = info.caster
if damage and info.target:
if damage_enabled and info.target:
var sdi : SpellDamageInfo = SpellDamageInfo.new()
sdi.damage_source = self
@ -149,7 +149,7 @@ func handle_cooldown(info : SpellCastInfo) -> void:
info.caster.adds_cooldown(id, cooldown_cooldown)
func handle_gcd(info : SpellCastInfo) -> void:
if cooldown_global_cooldown and cast_cast_time < 0.01:
if cooldown_global_cooldown_enabled and cast_cast_time < 0.01:
info.caster.sstart_global_cooldown(info.caster.get_gcd().scurrent)
func add_spell_cast_effect(info : SpellCastInfo) -> void:

View File

@ -161,7 +161,7 @@ func setup_icon() -> void:
ThemeAtlas.unref_texture(icon_rect.texture)
icon_rect.texture = null
var spell = Entities.get_spell(button_entry.item_id)
var spell : Spell = Entities.get_spell(button_entry.item_id) as Spell
if spell.icon != null:
icon_rect.texture = ThemeAtlas.add_texture(spell.icon)
@ -169,7 +169,7 @@ func setup_icon() -> void:
spell_id = spell.id
spell_type = spell.spell_type
has_gcd = spell.cooldown_global_cooldown
has_gcd = spell.cooldown_global_cooldown_enabled
func _on_button_pressed() -> void:
if (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL):