added a few more singletons and started reorganization/refactoring
This commit is contained in:
parent
4d67f43f3b
commit
dac8e73f01
@ -17,7 +17,10 @@ config/icon="res://assets/icon.svg"
|
|||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
|
WorldState="*res://scripts/WorldState.gd"
|
||||||
SignalBus="*res://scripts/SignalBus.gd"
|
SignalBus="*res://scripts/SignalBus.gd"
|
||||||
|
GlobalTypes="*res://scripts/GlobalTypes.gd"
|
||||||
|
Styling="*res://scripts/Styling.gd"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
@ -12,36 +12,11 @@ enum TargTypes {
|
|||||||
AREA,
|
AREA,
|
||||||
RAY,
|
RAY,
|
||||||
}
|
}
|
||||||
enum PDmgTypes {
|
|
||||||
SLICE,
|
|
||||||
PUNCTURE,
|
|
||||||
BASH,
|
|
||||||
HACK,
|
|
||||||
SHRED,
|
|
||||||
}
|
|
||||||
enum MDmgTypes {
|
|
||||||
BURN,
|
|
||||||
FREEZE,
|
|
||||||
SHOCK,
|
|
||||||
POISON,
|
|
||||||
LIFE,
|
|
||||||
MENTAL,
|
|
||||||
RADIANT,
|
|
||||||
ARCANE,
|
|
||||||
FORCE
|
|
||||||
}
|
|
||||||
enum SModTypes {
|
|
||||||
STUN,
|
|
||||||
SLOW,
|
|
||||||
ABSORB,
|
|
||||||
SHIELD,
|
|
||||||
DOTB,
|
|
||||||
DOTE
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@export var attack_range := 0
|
@export var attack_range := 0
|
||||||
@export var attack_type := TargTypes.SINGLE
|
@export var attack_type := TargTypes.SINGLE
|
||||||
|
@export var damage_type := GlobalTypes.Ability.PDmgTypes.SLICE
|
||||||
@export var attack_damage := 200
|
@export var attack_damage := 200
|
||||||
@export var attack_speed := 1.0
|
@export var attack_speed := 1.0
|
||||||
@export var base_cooldown := 0.0
|
@export var base_cooldown := 0.0
|
||||||
|
31
scripts/GlobalTypes.gd
Normal file
31
scripts/GlobalTypes.gd
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# file containing type information to be referrenced by other classes
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
class Ability:
|
||||||
|
enum PDmgTypes {
|
||||||
|
SLICE,
|
||||||
|
PUNCTURE,
|
||||||
|
BASH,
|
||||||
|
HACK,
|
||||||
|
SHRED,
|
||||||
|
}
|
||||||
|
enum MDmgTypes {
|
||||||
|
BURN,
|
||||||
|
FREEZE,
|
||||||
|
SHOCK,
|
||||||
|
POISON,
|
||||||
|
LIFE,
|
||||||
|
MENTAL,
|
||||||
|
RADIANT,
|
||||||
|
ARCANE,
|
||||||
|
FORCE
|
||||||
|
}
|
||||||
|
enum SModTypes {
|
||||||
|
STUN,
|
||||||
|
SLOW,
|
||||||
|
ABSORB,
|
||||||
|
SHIELD,
|
||||||
|
DOTB,
|
||||||
|
DOTE
|
||||||
|
}
|
@ -1,25 +1,25 @@
|
|||||||
extends NPC
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
func format_label_difficulty(label: Node, difficulty: NPC.NPCDifficulties) -> void:
|
func format_label_difficulty(label: Node, difficulty: NPC.NPCDifficulties) -> void:
|
||||||
label.label_settings.outline_size = 4
|
label.label_settings.outline_size = 4
|
||||||
match difficulty:
|
match difficulty:
|
||||||
NPCDifficulties.MINION:
|
NPC.NPCDifficulties.MINION:
|
||||||
label.label_settings.outline_color = Color.BLACK
|
label.label_settings.outline_color = Color.BLACK
|
||||||
label.label_settings.font_color = Color.LIGHT_GRAY
|
label.label_settings.font_color = Color.LIGHT_GRAY
|
||||||
NPCDifficulties.NORMAL:
|
NPC.NPCDifficulties.NORMAL:
|
||||||
label.label_settings.outline_color = Color.DARK_GREEN
|
label.label_settings.outline_color = Color.DARK_GREEN
|
||||||
label.label_settings.font_color = Color.LIME_GREEN
|
label.label_settings.font_color = Color.LIME_GREEN
|
||||||
NPCDifficulties.ELITE:
|
NPC.NPCDifficulties.ELITE:
|
||||||
label.label_settings.outline_color = Color.DARK_BLUE
|
label.label_settings.outline_color = Color.DARK_BLUE
|
||||||
label.label_settings.font_color = Color.DARK_CYAN
|
label.label_settings.font_color = Color.DARK_CYAN
|
||||||
NPCDifficulties.BOSS:
|
NPC.NPCDifficulties.BOSS:
|
||||||
label.label_settings.outline_color = Color.PURPLE
|
label.label_settings.outline_color = Color.PURPLE
|
||||||
label.label_settings.font_color = Color.MAGENTA
|
label.label_settings.font_color = Color.MAGENTA
|
||||||
NPCDifficulties.ELITEBOSS:
|
NPC.NPCDifficulties.ELITEBOSS:
|
||||||
label.label_settings.outline_color = Color.ORANGE_RED
|
label.label_settings.outline_color = Color.ORANGE_RED
|
||||||
label.label_settings.font_color = Color.ORANGE
|
label.label_settings.font_color = Color.ORANGE
|
||||||
NPCDifficulties.BBEG:
|
NPC.NPCDifficulties.BBEG:
|
||||||
label.label_settings.font_color = Color.GOLD
|
label.label_settings.font_color = Color.GOLD
|
||||||
label.label_settings.outline_size = 8
|
label.label_settings.outline_size = 8
|
||||||
label.label_settings.outline_color = Color.DARK_RED
|
label.label_settings.outline_color = Color.DARK_RED
|
@ -1,5 +1,4 @@
|
|||||||
# defines the parameters for spawning enemies within an area and handles
|
# defines the parameters for quests and spawning enemies within an area
|
||||||
# enemy death signals
|
|
||||||
class_name WorldArea
|
class_name WorldArea
|
||||||
extends PanelContainer
|
extends PanelContainer
|
||||||
|
|
||||||
|
2
scripts/WorldState.gd
Normal file
2
scripts/WorldState.gd
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# file containing the world state for the player
|
||||||
|
extends Node
|
@ -1,5 +1,5 @@
|
|||||||
class_name WorldZone
|
|
||||||
extends Sprite2D
|
|
||||||
|
|
||||||
|
|
||||||
# zone class defines all parameters for creating areas within itself
|
# zone class defines all parameters for creating areas within itself
|
||||||
|
class_name WorldZone
|
||||||
|
extends PanelContainer
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user