wip Components/Customizable
This commit is contained in:
parent
652d1bf757
commit
5c88f4ed48
@ -42,10 +42,6 @@ enabled=PackedStringArray("res://addons/godot_resource_groups/plugin.cfg", "res:
|
|||||||
|
|
||||||
auto_rebuild=true
|
auto_rebuild=true
|
||||||
|
|
||||||
[physics]
|
|
||||||
|
|
||||||
3d/physics_engine="JoltPhysics3D"
|
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
strafe_left={
|
strafe_left={
|
||||||
@ -78,3 +74,7 @@ turn_right={
|
|||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[physics]
|
||||||
|
|
||||||
|
3d/physics_engine="JoltPhysics3D"
|
||||||
|
|||||||
8
resources/Character.tres
Normal file
8
resources/Character.tres
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Character" load_steps=3 format=3 uid="uid://bd1ugbnlm08vv"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Character/Character.gd" id="1_8yb2m"]
|
||||||
|
[ext_resource type="Resource" uid="uid://qcjre5wwbrs3" path="res://resources/PlayerStats.tres" id="2_rc7x1"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_8yb2m")
|
||||||
|
stats = ExtResource("2_rc7x1")
|
||||||
7
resources/Hp.tres
Normal file
7
resources/Hp.tres
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Health" load_steps=2 format=3 uid="uid://c3gf5mi1u151m"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/Health.gd" id="1_yqlcl"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_yqlcl")
|
||||||
|
_value = 0
|
||||||
36
resources/PlayerStats.tres
Normal file
36
resources/PlayerStats.tres
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
[gd_resource type="Resource" script_class="CharacterStats" load_steps=12 format=3 uid="uid://qcjre5wwbrs3"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/Armor.gd" id="1_c7135"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Character/CharacterStats.gd" id="1_xti0a"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/Health.gd" id="2_hsnpy"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/MaxHealth.gd" id="3_26tso"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/MovementSpeed.gd" id="4_goc2a"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/resources/Stats/Shield.gd" id="6_rncik"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vbm44"]
|
||||||
|
script = ExtResource("1_c7135")
|
||||||
|
_value = 0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nyvlf"]
|
||||||
|
script = ExtResource("2_hsnpy")
|
||||||
|
_value = 0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pxuuc"]
|
||||||
|
script = ExtResource("3_26tso")
|
||||||
|
_value = 10
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vs6ff"]
|
||||||
|
script = ExtResource("4_goc2a")
|
||||||
|
_value = 0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_r5hb1"]
|
||||||
|
script = ExtResource("6_rncik")
|
||||||
|
_value = 0
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_xti0a")
|
||||||
|
max_health = SubResource("Resource_pxuuc")
|
||||||
|
health = SubResource("Resource_nyvlf")
|
||||||
|
armor = SubResource("Resource_vbm44")
|
||||||
|
shield = SubResource("Resource_r5hb1")
|
||||||
|
movementSpeed = SubResource("Resource_vs6ff")
|
||||||
5
scripts/resources/Character/Character.gd
Normal file
5
scripts/resources/Character/Character.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Character
|
||||||
|
|
||||||
|
@export var stats: CharacterStats
|
||||||
9
scripts/resources/Character/CharacterStats.gd
Normal file
9
scripts/resources/Character/CharacterStats.gd
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name CharacterStats
|
||||||
|
|
||||||
|
@export var max_health: MaxHealth
|
||||||
|
@export var health: Health
|
||||||
|
@export var armor: Armor
|
||||||
|
@export var shield: Shield
|
||||||
|
@export var movementSpeed: MovementSpeed
|
||||||
3
scripts/resources/Character/PlayerCharacter.gd
Normal file
3
scripts/resources/Character/PlayerCharacter.gd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
extends Character
|
||||||
|
|
||||||
|
@export var mech: MechBase
|
||||||
6
scripts/resources/Effects/Effect.gd
Normal file
6
scripts/resources/Effects/Effect.gd
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Effect
|
||||||
|
|
||||||
|
func apply_effect (character: Character)-> void:
|
||||||
|
assert(false)
|
||||||
4
scripts/resources/Effects/RefillHpEffect.gd
Normal file
4
scripts/resources/Effects/RefillHpEffect.gd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
extends Effect
|
||||||
|
|
||||||
|
func apply_effect (character: Character)-> void:
|
||||||
|
character.stats.health.value = character.stats.max_health.value
|
||||||
9
scripts/resources/Equipment/EquipmentStats.gd
Normal file
9
scripts/resources/Equipment/EquipmentStats.gd
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name EquipmentStats
|
||||||
|
|
||||||
|
@export var max_health: MaxHealth
|
||||||
|
@export var armor: Armor
|
||||||
|
@export var shield: Shield
|
||||||
|
@export var movementSpeed: MovementSpeed
|
||||||
|
@export var damage: Damage
|
||||||
3
scripts/resources/Equipment/MechParts/Arms.gd
Normal file
3
scripts/resources/Equipment/MechParts/Arms.gd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
extends MechPart
|
||||||
|
|
||||||
|
class_name Arms
|
||||||
3
scripts/resources/Equipment/MechParts/Boots.gd
Normal file
3
scripts/resources/Equipment/MechParts/Boots.gd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
extends MechPart
|
||||||
|
|
||||||
|
class_name Boots
|
||||||
3
scripts/resources/Equipment/MechParts/Hydraulics.gd
Normal file
3
scripts/resources/Equipment/MechParts/Hydraulics.gd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
extends MechPart
|
||||||
|
|
||||||
|
class_name Hydraulics
|
||||||
7
scripts/resources/Equipment/MechParts/MechBase.gd
Normal file
7
scripts/resources/Equipment/MechParts/MechBase.gd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
extends MechPart
|
||||||
|
|
||||||
|
class_name MechBase
|
||||||
|
|
||||||
|
@export var boots: Boots
|
||||||
|
@export var arms: Arms
|
||||||
|
@export var hydraulics: Hydraulics
|
||||||
6
scripts/resources/Equipment/MechParts/MechPart.gd
Normal file
6
scripts/resources/Equipment/MechParts/MechPart.gd
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name MechPart
|
||||||
|
|
||||||
|
@export var name: String
|
||||||
|
@export var stats: EquipmentStats
|
||||||
13
scripts/resources/Stats/Armor.gd
Normal file
13
scripts/resources/Stats/Armor.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Armor
|
||||||
|
|
||||||
|
signal value_changed_signal(currentArmor: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
13
scripts/resources/Stats/Damage.gd
Normal file
13
scripts/resources/Stats/Damage.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Damage
|
||||||
|
|
||||||
|
signal value_changed_signal(currentDamage: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
13
scripts/resources/Stats/Health.gd
Normal file
13
scripts/resources/Stats/Health.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Health
|
||||||
|
|
||||||
|
signal value_changed_signal(currentHealth: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
13
scripts/resources/Stats/MaxHealth.gd
Normal file
13
scripts/resources/Stats/MaxHealth.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name MaxHealth
|
||||||
|
|
||||||
|
signal value_changed_signal(currentMaxHealth: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
13
scripts/resources/Stats/MovementSpeed.gd
Normal file
13
scripts/resources/Stats/MovementSpeed.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name MovementSpeed
|
||||||
|
|
||||||
|
signal value_changed_signal(currentMovementSpeed: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
13
scripts/resources/Stats/Shield.gd
Normal file
13
scripts/resources/Stats/Shield.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Shield
|
||||||
|
|
||||||
|
signal value_changed_signal(currentShield: int)
|
||||||
|
|
||||||
|
@export var _value: int
|
||||||
|
var value: int:
|
||||||
|
get:
|
||||||
|
return _value
|
||||||
|
set(new_value):
|
||||||
|
value = new_value;
|
||||||
|
value_changed_signal.emit(_value)
|
||||||
5
scripts/resources/Weapons/Weapon.gd
Normal file
5
scripts/resources/Weapons/Weapon.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name Weapon
|
||||||
|
|
||||||
|
@export var name: String
|
||||||
6
scripts/resources/Weapons/WeaponStats.gd
Normal file
6
scripts/resources/Weapons/WeaponStats.gd
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name WeaponStats
|
||||||
|
|
||||||
|
|
||||||
|
@export var damage: Damage
|
||||||
Loading…
Reference in New Issue
Block a user