mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-04 10:55:55 +00:00
42 lines
No EOL
970 B
C#
42 lines
No EOL
970 B
C#
using System;
|
|
using Cirno.Scripts;
|
|
using Godot;
|
|
using Godot.Collections;
|
|
|
|
namespace Cirno._3D.TrenchBroom.EntityScripts.Triggers;
|
|
|
|
public interface ITargetable
|
|
{
|
|
string TargetName { get; set; }
|
|
|
|
void ApplyTargetProperties(Dictionary<string, Variant> props)
|
|
{
|
|
TargetName = props["targetname"].AsString();
|
|
}
|
|
}
|
|
|
|
public interface ITargeting
|
|
{
|
|
string Target { get; set; }
|
|
|
|
void ApplyTargetingProperties(Dictionary<string, Variant> props)
|
|
{
|
|
Target = props["target"].AsString();
|
|
}
|
|
}
|
|
|
|
public interface IActivationType
|
|
{
|
|
ActivationType ActivationType { get; set; }
|
|
void ApplyActivationTypeProperties(Dictionary<string, Variant> props)
|
|
{
|
|
if (props.TryGetValue("activationtype", out var type))
|
|
{
|
|
var t = Enum.TryParse(type.AsString(), true, out ActivationType activationType);
|
|
if (t)
|
|
{
|
|
ActivationType = activationType;
|
|
}
|
|
}
|
|
}
|
|
} |