mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 17:15:55 +00:00
Enemy information
This commit is contained in:
parent
fff3ddc3cf
commit
b9b8834bc2
11 changed files with 118 additions and 61 deletions
|
|
@ -1,15 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Components.Actors;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
public partial class Actor : CharacterBody2D
|
||||
{
|
||||
[Export]
|
||||
public float MovementSpeed { get; private set; } = 20f;
|
||||
public EnemyResource EnemyData { get; private set; }
|
||||
|
||||
[Export]
|
||||
public float Health { get; private set; } = 4f;
|
||||
public float MovementSpeed => EnemyData.MovementSpeed;
|
||||
|
||||
public float Health => EnemyData.MaxHealth;
|
||||
|
||||
[ExportCategory("Defeat Script")]
|
||||
[Export] public Node2D DefeatScript { get; set; }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ public partial class EnemyResource : Resource
|
|||
[Export] public StringName EnemyKey { get; private set; }
|
||||
[Export] public StringName PrefabPath { get; private set; }
|
||||
[Export] public float MaxHealth { get; private set; }
|
||||
[Export] public float MovementSpeed { get; private set; } = 20f;
|
||||
[Export] public DamageResistance Resistances { get; private set; }
|
||||
[Export] public WeaponResource Weapon { get; private set; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue