Wednesday, 10 September 2025 01:31:36
This commit is contained in:
26
Gameplay/Traits/BasicAttack.cs
Normal file
26
Gameplay/Traits/BasicAttack.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class BasicAttack : Trait
|
||||
{
|
||||
public BasicAttack(Worker OWNER) : base(OWNER)
|
||||
{
|
||||
_triggers.Add(Trigger.On.Collision);
|
||||
}
|
||||
|
||||
public override void Fire()
|
||||
{
|
||||
if (_target != null)
|
||||
{
|
||||
|
||||
if (_target._manager != _owner._manager)
|
||||
{
|
||||
int damage = -_owner._aptitude._default / 2;
|
||||
// target.ChangeHealth(damage, owner);
|
||||
}
|
||||
}
|
||||
_target = null;
|
||||
}
|
||||
|
||||
}
|
||||
1
Gameplay/Traits/BasicAttack.cs.uid
Normal file
1
Gameplay/Traits/BasicAttack.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://2ilonmgvkayp
|
||||
15
Gameplay/Traits/Caffeinate.cs
Normal file
15
Gameplay/Traits/Caffeinate.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Caffeinate : Trait
|
||||
{
|
||||
public Caffeinate(Worker OWNER) : base(OWNER)
|
||||
{
|
||||
_triggers.Add(Trigger.On.Collision);
|
||||
}
|
||||
|
||||
public override void Fire()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
1
Gameplay/Traits/Caffeinate.cs.uid
Normal file
1
Gameplay/Traits/Caffeinate.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cbk76ik5o17nx
|
||||
6
Gameplay/Traits/basic_attack.tscn
Normal file
6
Gameplay/Traits/basic_attack.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bih70e65g1108"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2ilonmgvkayp" path="res://Gameplay/Traits/BasicAttack.cs" id="1_egsn3"]
|
||||
|
||||
[node name="BasicAttack" type="Node"]
|
||||
script = ExtResource("1_egsn3")
|
||||
6
Gameplay/Traits/caffeinate.tscn
Normal file
6
Gameplay/Traits/caffeinate.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bo2rj0albmkkw"]
|
||||
|
||||
[ext_resource type="Script" path="res://Gameplay/Effects/Caffeinate.cs" id="1_l8me6"]
|
||||
|
||||
[node name="Caffeinate" type="Node"]
|
||||
script = ExtResource("1_l8me6")
|
||||
Reference in New Issue
Block a user