1288 lines
37 KiB
C#
1288 lines
37 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using Godot;
|
|
using Godot.Bridge;
|
|
using Godot.NativeInterop;
|
|
|
|
[ScriptPath("res://Scripts/Entities/Player.cs")]
|
|
public class Player : Entity
|
|
{
|
|
[Signal]
|
|
public delegate void WasHurtEventHandler();
|
|
|
|
public new class MethodName : Entity.MethodName
|
|
{
|
|
public new static readonly StringName _EnterTree = "_EnterTree";
|
|
|
|
public static readonly StringName FollowerSetUp = "FollowerSetUp";
|
|
|
|
public static readonly StringName PartyStop = "PartyStop";
|
|
|
|
public static readonly StringName StopInput = "StopInput";
|
|
|
|
public new static readonly StringName _Process = "_Process";
|
|
|
|
public static readonly StringName UpdateOverlay = "UpdateOverlay";
|
|
|
|
public static readonly StringName DelayedColCheck = "DelayedColCheck";
|
|
|
|
public static readonly StringName AssumeControl = "AssumeControl";
|
|
|
|
public static readonly StringName UpdateSplitEntity = "UpdateSplitEntity";
|
|
|
|
public static readonly StringName ReleaseControl = "ReleaseControl";
|
|
|
|
public new static readonly StringName _PhysicsProcess = "_PhysicsProcess";
|
|
|
|
public new static readonly StringName LateUpdate = "LateUpdate";
|
|
|
|
public static readonly StringName DoInput = "DoInput";
|
|
|
|
public static readonly StringName AddFollowerStep = "AddFollowerStep";
|
|
|
|
public static readonly StringName ChangeInput = "ChangeInput";
|
|
|
|
public static readonly StringName ResetFollowStep = "ResetFollowStep";
|
|
|
|
public static readonly StringName EndInteraction = "EndInteraction";
|
|
|
|
public static readonly StringName UpdateLastDir = "UpdateLastDir";
|
|
|
|
public static readonly StringName Damage = "Damage";
|
|
|
|
public static readonly StringName SetActive = "SetActive";
|
|
}
|
|
|
|
public new class PropertyName : Entity.PropertyName
|
|
{
|
|
public static readonly StringName DWOverlay = "DWOverlay";
|
|
|
|
public static readonly StringName soul = "soul";
|
|
|
|
public static readonly StringName soulHitbox = "soulHitbox";
|
|
|
|
public static readonly StringName overlayAnim = "overlayAnim";
|
|
|
|
public static readonly StringName interact = "interact";
|
|
|
|
public static readonly StringName canInput = "canInput";
|
|
|
|
public static readonly StringName run = "run";
|
|
|
|
public static readonly StringName waitForMove = "waitForMove";
|
|
|
|
public static readonly StringName lockMenu = "lockMenu";
|
|
|
|
public static readonly StringName inputCD = "inputCD";
|
|
|
|
public static readonly StringName dangerZoneCD = "dangerZoneCD";
|
|
|
|
public static readonly StringName iFrames = "iFrames";
|
|
|
|
public static readonly StringName stepCD = "stepCD";
|
|
|
|
public static readonly StringName inDZone = "inDZone";
|
|
|
|
public static readonly StringName controlling = "controlling";
|
|
|
|
public static readonly StringName splitEntity = "splitEntity";
|
|
|
|
public static readonly StringName bullet = "bullet";
|
|
|
|
public static readonly StringName onPlatform = "onPlatform";
|
|
|
|
public static readonly StringName slide = "slide";
|
|
|
|
public static readonly StringName lastDelta = "lastDelta";
|
|
|
|
public static readonly StringName loaded = "loaded";
|
|
}
|
|
|
|
public new class SignalName : Entity.SignalName
|
|
{
|
|
public static readonly StringName WasHurt = "WasHurt";
|
|
}
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D DWOverlay;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Sprite2D soul;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public Area2D soulHitbox;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private AnimationPlayer overlayAnim;
|
|
|
|
private ShapeCast2D interact;
|
|
|
|
public static Player instance;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
public bool canInput;
|
|
|
|
public bool run;
|
|
|
|
public bool waitForMove;
|
|
|
|
public bool lockMenu;
|
|
|
|
public float inputCD;
|
|
|
|
public float dangerZoneCD;
|
|
|
|
public float iFrames;
|
|
|
|
public float stepCD;
|
|
|
|
public DangerZone inDZone;
|
|
|
|
public Entity controlling;
|
|
|
|
public Entity splitEntity;
|
|
|
|
public List<Vector2> pos = new List<Vector2>();
|
|
|
|
public List<Follower> followers = new List<Follower>();
|
|
|
|
public Node2D bullet;
|
|
|
|
public Node2D onPlatform;
|
|
|
|
private static readonly Vector2I interactOffset = new Vector2I(0, -4);
|
|
|
|
public Slide slide;
|
|
|
|
private const float interactPos = 8f;
|
|
|
|
public const int maxPos = 100;
|
|
|
|
public Vector2 lastDelta = Vector2.Down;
|
|
|
|
private bool loaded;
|
|
|
|
private WasHurtEventHandler backing_WasHurt;
|
|
|
|
public event WasHurtEventHandler WasHurt
|
|
{
|
|
add
|
|
{
|
|
backing_WasHurt = (WasHurtEventHandler)Delegate.Combine(backing_WasHurt, value);
|
|
}
|
|
remove
|
|
{
|
|
backing_WasHurt = (WasHurtEventHandler)Delegate.Remove(backing_WasHurt, value);
|
|
}
|
|
}
|
|
|
|
public override void _EnterTree()
|
|
{
|
|
if (!loaded)
|
|
{
|
|
base._EnterTree();
|
|
base.ProcessPriority = -1;
|
|
instance = this;
|
|
DWOverlay = GetNode<Sprite2D>("DWCover");
|
|
soul = DWOverlay.GetNode<Sprite2D>("Soul");
|
|
soulHitbox = soul.GetNode<Area2D>("Hitbox");
|
|
overlayAnim = DWOverlay.GetNode<AnimationPlayer>("Anim");
|
|
for (int i = 0; i < 100; i++)
|
|
{
|
|
pos.Add(base.GlobalPosition);
|
|
}
|
|
if (!GodotObject.IsInstanceValid(interact))
|
|
{
|
|
ShapeCast2D obj = new ShapeCast2D
|
|
{
|
|
Shape = new RectangleShape2D
|
|
{
|
|
Size = new Vector2(16f, 20f)
|
|
},
|
|
Enabled = false,
|
|
TargetPosition = Vector2.Zero,
|
|
CollideWithAreas = true,
|
|
CollideWithBodies = true
|
|
};
|
|
ShapeCast2D node = obj;
|
|
interact = obj;
|
|
AddChild(node, forceReadableName: false, InternalMode.Disabled);
|
|
}
|
|
CameraController.instance.follow = this;
|
|
controlling = this;
|
|
Party.SpawnFollowers();
|
|
if (SaveFile.current.flags.Contains(SaveFile.Flags.IsInDW))
|
|
{
|
|
Party.AnimMod(AnimMods.DW);
|
|
}
|
|
soulHitbox.AreaEntered += Damage;
|
|
soulHitbox.CollisionLayer = 8u;
|
|
soulHitbox.CollisionMask = 8u;
|
|
Room.current?.entities.Add(this);
|
|
loaded = true;
|
|
}
|
|
}
|
|
|
|
public void FollowerSetUp()
|
|
{
|
|
ResetFollowStep();
|
|
for (int i = 0; i < followers.Count; i++)
|
|
{
|
|
followers[i].GlobalPosition = base.GlobalPosition + Vector2.Up * 0.01f;
|
|
if (SaveFile.current.flags.Contains(SaveFile.Flags.IsInDW))
|
|
{
|
|
followers[i].animMod = AnimMods.DW;
|
|
followers[i].UpdateAnim(force: true);
|
|
}
|
|
}
|
|
}
|
|
|
|
public void PartyStop()
|
|
{
|
|
Party.StopMoving();
|
|
}
|
|
|
|
public void StopInput()
|
|
{
|
|
canInput = false;
|
|
}
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
base._Process(delta);
|
|
if (inputCD > 0f)
|
|
{
|
|
inputCD -= Main.deltaTime;
|
|
}
|
|
if (iFrames > 0f)
|
|
{
|
|
iFrames -= Main.deltaTime;
|
|
}
|
|
if (stepCD > 0f && base.Velocity.LengthSquared() > 0f)
|
|
{
|
|
stepCD -= Main.deltaTime;
|
|
}
|
|
if (dangerZoneCD > 0f)
|
|
{
|
|
UpdateOverlay();
|
|
dangerZoneCD -= Main.deltaTime;
|
|
DWOverlay.Modulate = DWOverlay.Modulate.Lerp(Main.colorWhite, Main.deltaTime * 0.2f);
|
|
sprite.SelfModulate = sprite.SelfModulate.Lerp(Main.colorClear, Main.deltaTime * 0.2f);
|
|
}
|
|
else
|
|
{
|
|
DWOverlay.Modulate = DWOverlay.Modulate.Lerp(Main.colorClear, Main.deltaTime * 0.2f);
|
|
sprite.SelfModulate = sprite.SelfModulate.Lerp(Main.colorWhite, Main.deltaTime * 0.2f);
|
|
}
|
|
if (Main.inEvent == null)
|
|
{
|
|
if (canInput)
|
|
{
|
|
DoInput();
|
|
}
|
|
else
|
|
{
|
|
waitForMove = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public void UpdateOverlay()
|
|
{
|
|
DWOverlay.FlipH = sprite.FlipH;
|
|
if (overlayAnim.HasAnimation(anim.CurrentAnimation))
|
|
{
|
|
overlayAnim.Play(anim.CurrentAnimation);
|
|
}
|
|
}
|
|
|
|
public void DelayedColCheck()
|
|
{
|
|
Party.CheckColliders();
|
|
}
|
|
|
|
public static void AssumeControl(Entity other, bool playParticle = true, bool updateCamera = true)
|
|
{
|
|
ReleaseControl();
|
|
instance.controlling = other;
|
|
other.CollisionMask = 1u;
|
|
other.CollisionLayer = 1u;
|
|
other.StopMoving();
|
|
if (updateCamera)
|
|
{
|
|
CameraController.instance.follow = other;
|
|
}
|
|
CameraController.instance.offset = CameraController.defaultOffset;
|
|
Party.StopMoving();
|
|
if (playParticle)
|
|
{
|
|
Party.PlaySplitParticle(other);
|
|
}
|
|
UpdateLastDir();
|
|
}
|
|
|
|
public static void UpdateSplitEntity()
|
|
{
|
|
if (instance.controlling == instance)
|
|
{
|
|
instance.splitEntity = null;
|
|
instance.waitForMove = true;
|
|
}
|
|
else
|
|
{
|
|
instance.splitEntity = instance.controlling;
|
|
}
|
|
}
|
|
|
|
public static void ReleaseControl()
|
|
{
|
|
if (instance.controlling != null)
|
|
{
|
|
instance.controlling.StopMoving();
|
|
if (instance.controlling is Follower)
|
|
{
|
|
instance.controlling.CollisionLayer = 524288u;
|
|
instance.controlling.CollisionMask = 524288u;
|
|
}
|
|
else if (instance.controlling == instance)
|
|
{
|
|
instance.CollisionLayer = 1u;
|
|
instance.CollisionMask = 1u;
|
|
}
|
|
instance.controlling = null;
|
|
}
|
|
}
|
|
|
|
public override void _PhysicsProcess(double delta)
|
|
{
|
|
MoveAndSlide();
|
|
}
|
|
|
|
public override void LateUpdate()
|
|
{
|
|
base.LateUpdate();
|
|
if (Main.inEvent == null)
|
|
{
|
|
base.GlobalPosition = base.GlobalPosition.Round();
|
|
}
|
|
if (interact.Enabled)
|
|
{
|
|
interact.Enabled = false;
|
|
}
|
|
}
|
|
|
|
private void DoInput()
|
|
{
|
|
Vector2 vector = Main.GetDirection();
|
|
if (vector != Vector2.Zero)
|
|
{
|
|
vector = vector.Normalized() * baseSpeed;
|
|
if (Input.IsActionPressed(Main.keys[5]))
|
|
{
|
|
run = !Settings.file.run;
|
|
}
|
|
else
|
|
{
|
|
run = Settings.file.run;
|
|
}
|
|
if (run)
|
|
{
|
|
vector *= 2f;
|
|
}
|
|
lastDelta = vector.Normalized();
|
|
AddFollowerStep();
|
|
controlling.LookAt(controlling.GlobalPosition + lastDelta);
|
|
controlling.currentAnim = Animations.Walk;
|
|
if (Room.current.stepSound != null && stepCD <= 0f && slide == null)
|
|
{
|
|
Audio.PlaySound(Room.current.stepSound, 1.5f);
|
|
stepCD = (run ? 20 : 30);
|
|
}
|
|
waitForMove = false;
|
|
}
|
|
else
|
|
{
|
|
run = false;
|
|
controlling.currentAnim = Animations.Idle;
|
|
}
|
|
if (slide != null)
|
|
{
|
|
controlling.Velocity = new Vector2(vector.X, baseSpeed * 2f);
|
|
controlling.currentAnim = Animations.Slide;
|
|
}
|
|
else
|
|
{
|
|
controlling.Velocity = vector;
|
|
}
|
|
if (GodotObject.IsInstanceValid(bullet))
|
|
{
|
|
return;
|
|
}
|
|
if (Input.IsActionJustPressed(Main.keys[4]) && inputCD <= 0f && dangerZoneCD <= 0f && onPlatform == null)
|
|
{
|
|
interact.GlobalPosition = controlling.GlobalPosition + lastDelta * 8f + interactOffset;
|
|
interact.Enabled = true;
|
|
interact.ForceShapecastUpdate();
|
|
if (interact.GetCollisionCount() > 0)
|
|
{
|
|
for (int i = 0; i < interact.GetCollisionCount(); i++)
|
|
{
|
|
if (interact.GetCollider(i) is Interacteable interacteable)
|
|
{
|
|
canInput = false;
|
|
interacteable.Interact();
|
|
return;
|
|
}
|
|
if (((Node)interact.GetCollider(i)).GetParent() is Interacteable interacteable2)
|
|
{
|
|
canInput = false;
|
|
interacteable2.Interact();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (Room.current.waterBullet > 0 && controlling == this)
|
|
{
|
|
Main.inEvent = Coroutine.Start(CommonEvents.ShootWater());
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!Input.IsActionJustPressed(Main.keys[6]) || !(dangerZoneCD <= 0f) || !(inputCD <= 0f) || slide != null || lockMenu || GodotObject.IsInstanceValid(bullet) || onPlatform != null)
|
|
{
|
|
return;
|
|
}
|
|
if (splitEntity == null)
|
|
{
|
|
if (animMod == AnimMods.DW || SaveFile.current.flags.Contains(SaveFile.Flags.IsInDW))
|
|
{
|
|
if (!DWMenu.instance.closing)
|
|
{
|
|
DWMenu.instance.Open();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
LWMenu.instance.Open();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
inputCD = 30f;
|
|
if (controlling == splitEntity)
|
|
{
|
|
AssumeControl(instance);
|
|
}
|
|
else
|
|
{
|
|
AssumeControl(splitEntity);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public void AddFollowerStep(bool update = false)
|
|
{
|
|
Vector2 globalPosition = base.GlobalPosition;
|
|
List<Vector2> list = pos;
|
|
if (list[list.Count - 1] != globalPosition)
|
|
{
|
|
pos.Add(globalPosition);
|
|
if (pos.Count >= 100)
|
|
{
|
|
pos.RemoveAt(0);
|
|
}
|
|
}
|
|
if (update)
|
|
{
|
|
for (int i = 0; i < followers.Count; i++)
|
|
{
|
|
followers[i].DoMovement(force: true);
|
|
}
|
|
}
|
|
}
|
|
|
|
public IEnumerator ResetInput(bool value = true, int waitFrames = 2)
|
|
{
|
|
for (int i = 0; i < waitFrames; i++)
|
|
{
|
|
yield return null;
|
|
}
|
|
canInput = value;
|
|
}
|
|
|
|
public void ChangeInput(bool value = true)
|
|
{
|
|
canInput = value;
|
|
}
|
|
|
|
public void ResetFollowStep()
|
|
{
|
|
Vector2 globalPosition = base.GlobalPosition;
|
|
for (int i = 0; i < pos.Count; i++)
|
|
{
|
|
pos[i] = globalPosition;
|
|
}
|
|
}
|
|
|
|
public void EndInteraction()
|
|
{
|
|
inputCD = 20f;
|
|
canInput = true;
|
|
}
|
|
|
|
public static void UpdateLastDir()
|
|
{
|
|
instance.lastDelta = Entity.directions.First((KeyValuePair<Vector2, Direction> x) => x.Value == instance.controlling.direction).Key;
|
|
}
|
|
|
|
private void Damage(Node other)
|
|
{
|
|
if (iFrames <= 0f && Room.current.lifeTime >= 60f)
|
|
{
|
|
Audio.PlaySound("snd_hurt1.wav");
|
|
CameraController.instance.shakeIntensity = 3f;
|
|
CameraController.instance.shakeTime = 5f;
|
|
Party.ChangeHP(-10);
|
|
if (Party.AlivePartyAmount() == 0)
|
|
{
|
|
Main.inEvent = Coroutine.Start(GameOver.DoGameOver());
|
|
Room.current.CallDeferred("DisableProcess");
|
|
return;
|
|
}
|
|
Party.ReviveAll(fullHP: false);
|
|
Party.UpdateHUD();
|
|
BattleDR.ShowFloatingText("10", base.GlobalPosition).ProcessMode = ProcessModeEnum.Always;
|
|
EmitSignal(SignalName.WasHurt);
|
|
iFrames = 30f;
|
|
DWMenu.instance.showHP = 180f;
|
|
}
|
|
}
|
|
|
|
public static void SetActive(bool state, bool alsoFollowers = true)
|
|
{
|
|
if (alsoFollowers)
|
|
{
|
|
for (int i = 0; i < instance.followers.Count; i++)
|
|
{
|
|
Main.SetActive(instance.followers[i], state);
|
|
}
|
|
}
|
|
Main.SetActive(instance, state);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
internal new static List<MethodInfo> GetGodotMethodList()
|
|
{
|
|
return new List<MethodInfo>(20)
|
|
{
|
|
new MethodInfo(MethodName._EnterTree, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.FollowerSetUp, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.PartyStop, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.StopInput, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName._Process, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Float, "delta", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.UpdateOverlay, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.DelayedColCheck, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.AssumeControl, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal | MethodFlags.Static, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Object, "other", PropertyHint.None, "", PropertyUsageFlags.Default, new StringName("CharacterBody2D"), exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, "playParticle", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, "updateCamera", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.UpdateSplitEntity, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal | MethodFlags.Static, null, null),
|
|
new MethodInfo(MethodName.ReleaseControl, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal | MethodFlags.Static, null, null),
|
|
new MethodInfo(MethodName._PhysicsProcess, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Float, "delta", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.LateUpdate, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.DoInput, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.AddFollowerStep, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Bool, "update", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.ChangeInput, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Bool, "value", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.ResetFollowStep, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.EndInteraction, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
|
|
new MethodInfo(MethodName.UpdateLastDir, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal | MethodFlags.Static, null, null),
|
|
new MethodInfo(MethodName.Damage, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Object, "other", PropertyHint.None, "", PropertyUsageFlags.Default, new StringName("Node"), exported: false)
|
|
}, null),
|
|
new MethodInfo(MethodName.SetActive, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal | MethodFlags.Static, new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Bool, "state", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, "alsoFollowers", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
|
|
}, null)
|
|
};
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
|
|
{
|
|
if (method == MethodName._EnterTree && args.Count == 0)
|
|
{
|
|
_EnterTree();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.FollowerSetUp && args.Count == 0)
|
|
{
|
|
FollowerSetUp();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.PartyStop && args.Count == 0)
|
|
{
|
|
PartyStop();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.StopInput && args.Count == 0)
|
|
{
|
|
StopInput();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName._Process && args.Count == 1)
|
|
{
|
|
_Process(VariantUtils.ConvertTo<double>(in args[0]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateOverlay && args.Count == 0)
|
|
{
|
|
UpdateOverlay();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.DelayedColCheck && args.Count == 0)
|
|
{
|
|
DelayedColCheck();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.AssumeControl && args.Count == 3)
|
|
{
|
|
AssumeControl(VariantUtils.ConvertTo<Entity>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1]), VariantUtils.ConvertTo<bool>(in args[2]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateSplitEntity && args.Count == 0)
|
|
{
|
|
UpdateSplitEntity();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.ReleaseControl && args.Count == 0)
|
|
{
|
|
ReleaseControl();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName._PhysicsProcess && args.Count == 1)
|
|
{
|
|
_PhysicsProcess(VariantUtils.ConvertTo<double>(in args[0]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.LateUpdate && args.Count == 0)
|
|
{
|
|
LateUpdate();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.DoInput && args.Count == 0)
|
|
{
|
|
DoInput();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.AddFollowerStep && args.Count == 1)
|
|
{
|
|
AddFollowerStep(VariantUtils.ConvertTo<bool>(in args[0]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.ChangeInput && args.Count == 1)
|
|
{
|
|
ChangeInput(VariantUtils.ConvertTo<bool>(in args[0]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.ResetFollowStep && args.Count == 0)
|
|
{
|
|
ResetFollowStep();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.EndInteraction && args.Count == 0)
|
|
{
|
|
EndInteraction();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateLastDir && args.Count == 0)
|
|
{
|
|
UpdateLastDir();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.Damage && args.Count == 1)
|
|
{
|
|
Damage(VariantUtils.ConvertTo<Node>(in args[0]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.SetActive && args.Count == 2)
|
|
{
|
|
SetActive(VariantUtils.ConvertTo<bool>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
return base.InvokeGodotClassMethod(in method, args, out ret);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
internal static bool InvokeGodotClassStaticMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
|
|
{
|
|
if (method == MethodName.AssumeControl && args.Count == 3)
|
|
{
|
|
AssumeControl(VariantUtils.ConvertTo<Entity>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1]), VariantUtils.ConvertTo<bool>(in args[2]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateSplitEntity && args.Count == 0)
|
|
{
|
|
UpdateSplitEntity();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.ReleaseControl && args.Count == 0)
|
|
{
|
|
ReleaseControl();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateLastDir && args.Count == 0)
|
|
{
|
|
UpdateLastDir();
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
if (method == MethodName.SetActive && args.Count == 2)
|
|
{
|
|
SetActive(VariantUtils.ConvertTo<bool>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1]));
|
|
ret = default(godot_variant);
|
|
return true;
|
|
}
|
|
ret = default(godot_variant);
|
|
return false;
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override bool HasGodotClassMethod(in godot_string_name method)
|
|
{
|
|
if (method == MethodName._EnterTree)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.FollowerSetUp)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.PartyStop)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.StopInput)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName._Process)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateOverlay)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.DelayedColCheck)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.AssumeControl)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateSplitEntity)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.ReleaseControl)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName._PhysicsProcess)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.LateUpdate)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.DoInput)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.AddFollowerStep)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.ChangeInput)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.ResetFollowStep)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.EndInteraction)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.UpdateLastDir)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.Damage)
|
|
{
|
|
return true;
|
|
}
|
|
if (method == MethodName.SetActive)
|
|
{
|
|
return true;
|
|
}
|
|
return base.HasGodotClassMethod(in method);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
|
|
{
|
|
if (name == PropertyName.DWOverlay)
|
|
{
|
|
DWOverlay = VariantUtils.ConvertTo<Sprite2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.soul)
|
|
{
|
|
soul = VariantUtils.ConvertTo<Sprite2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.soulHitbox)
|
|
{
|
|
soulHitbox = VariantUtils.ConvertTo<Area2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.overlayAnim)
|
|
{
|
|
overlayAnim = VariantUtils.ConvertTo<AnimationPlayer>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.interact)
|
|
{
|
|
interact = VariantUtils.ConvertTo<ShapeCast2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.canInput)
|
|
{
|
|
canInput = VariantUtils.ConvertTo<bool>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.run)
|
|
{
|
|
run = VariantUtils.ConvertTo<bool>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.waitForMove)
|
|
{
|
|
waitForMove = VariantUtils.ConvertTo<bool>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.lockMenu)
|
|
{
|
|
lockMenu = VariantUtils.ConvertTo<bool>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.inputCD)
|
|
{
|
|
inputCD = VariantUtils.ConvertTo<float>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.dangerZoneCD)
|
|
{
|
|
dangerZoneCD = VariantUtils.ConvertTo<float>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.iFrames)
|
|
{
|
|
iFrames = VariantUtils.ConvertTo<float>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.stepCD)
|
|
{
|
|
stepCD = VariantUtils.ConvertTo<float>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.inDZone)
|
|
{
|
|
inDZone = VariantUtils.ConvertTo<DangerZone>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.controlling)
|
|
{
|
|
controlling = VariantUtils.ConvertTo<Entity>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.splitEntity)
|
|
{
|
|
splitEntity = VariantUtils.ConvertTo<Entity>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.bullet)
|
|
{
|
|
bullet = VariantUtils.ConvertTo<Node2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.onPlatform)
|
|
{
|
|
onPlatform = VariantUtils.ConvertTo<Node2D>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.slide)
|
|
{
|
|
slide = VariantUtils.ConvertTo<Slide>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.lastDelta)
|
|
{
|
|
lastDelta = VariantUtils.ConvertTo<Vector2>(in value);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.loaded)
|
|
{
|
|
loaded = VariantUtils.ConvertTo<bool>(in value);
|
|
return true;
|
|
}
|
|
return base.SetGodotClassPropertyValue(in name, in value);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
|
|
{
|
|
if (name == PropertyName.DWOverlay)
|
|
{
|
|
value = VariantUtils.CreateFrom(in DWOverlay);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.soul)
|
|
{
|
|
value = VariantUtils.CreateFrom(in soul);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.soulHitbox)
|
|
{
|
|
value = VariantUtils.CreateFrom(in soulHitbox);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.overlayAnim)
|
|
{
|
|
value = VariantUtils.CreateFrom(in overlayAnim);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.interact)
|
|
{
|
|
value = VariantUtils.CreateFrom(in interact);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.canInput)
|
|
{
|
|
value = VariantUtils.CreateFrom(in canInput);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.run)
|
|
{
|
|
value = VariantUtils.CreateFrom(in run);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.waitForMove)
|
|
{
|
|
value = VariantUtils.CreateFrom(in waitForMove);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.lockMenu)
|
|
{
|
|
value = VariantUtils.CreateFrom(in lockMenu);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.inputCD)
|
|
{
|
|
value = VariantUtils.CreateFrom(in inputCD);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.dangerZoneCD)
|
|
{
|
|
value = VariantUtils.CreateFrom(in dangerZoneCD);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.iFrames)
|
|
{
|
|
value = VariantUtils.CreateFrom(in iFrames);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.stepCD)
|
|
{
|
|
value = VariantUtils.CreateFrom(in stepCD);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.inDZone)
|
|
{
|
|
value = VariantUtils.CreateFrom(in inDZone);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.controlling)
|
|
{
|
|
value = VariantUtils.CreateFrom(in controlling);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.splitEntity)
|
|
{
|
|
value = VariantUtils.CreateFrom(in splitEntity);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.bullet)
|
|
{
|
|
value = VariantUtils.CreateFrom(in bullet);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.onPlatform)
|
|
{
|
|
value = VariantUtils.CreateFrom(in onPlatform);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.slide)
|
|
{
|
|
value = VariantUtils.CreateFrom(in slide);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.lastDelta)
|
|
{
|
|
value = VariantUtils.CreateFrom(in lastDelta);
|
|
return true;
|
|
}
|
|
if (name == PropertyName.loaded)
|
|
{
|
|
value = VariantUtils.CreateFrom(in loaded);
|
|
return true;
|
|
}
|
|
return base.GetGodotClassPropertyValue(in name, out value);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
internal new static List<PropertyInfo> GetGodotPropertyList()
|
|
{
|
|
return new List<PropertyInfo>
|
|
{
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.DWOverlay, PropertyHint.NodeType, "Sprite2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.soul, PropertyHint.NodeType, "Sprite2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.soulHitbox, PropertyHint.NodeType, "Area2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.overlayAnim, PropertyHint.NodeType, "AnimationPlayer", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.interact, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, PropertyName.canInput, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
|
|
new PropertyInfo(Variant.Type.Bool, PropertyName.run, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, PropertyName.waitForMove, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, PropertyName.lockMenu, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Float, PropertyName.inputCD, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Float, PropertyName.dangerZoneCD, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Float, PropertyName.iFrames, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Float, PropertyName.stepCD, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.inDZone, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.controlling, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.splitEntity, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.bullet, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.onPlatform, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Object, PropertyName.slide, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Vector2, PropertyName.lastDelta, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
|
|
new PropertyInfo(Variant.Type.Bool, PropertyName.loaded, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false)
|
|
};
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override void SaveGodotObjectData(GodotSerializationInfo info)
|
|
{
|
|
base.SaveGodotObjectData(info);
|
|
info.AddProperty(PropertyName.DWOverlay, Variant.From(in DWOverlay));
|
|
info.AddProperty(PropertyName.soul, Variant.From(in soul));
|
|
info.AddProperty(PropertyName.soulHitbox, Variant.From(in soulHitbox));
|
|
info.AddProperty(PropertyName.overlayAnim, Variant.From(in overlayAnim));
|
|
info.AddProperty(PropertyName.interact, Variant.From(in interact));
|
|
info.AddProperty(PropertyName.canInput, Variant.From(in canInput));
|
|
info.AddProperty(PropertyName.run, Variant.From(in run));
|
|
info.AddProperty(PropertyName.waitForMove, Variant.From(in waitForMove));
|
|
info.AddProperty(PropertyName.lockMenu, Variant.From(in lockMenu));
|
|
info.AddProperty(PropertyName.inputCD, Variant.From(in inputCD));
|
|
info.AddProperty(PropertyName.dangerZoneCD, Variant.From(in dangerZoneCD));
|
|
info.AddProperty(PropertyName.iFrames, Variant.From(in iFrames));
|
|
info.AddProperty(PropertyName.stepCD, Variant.From(in stepCD));
|
|
info.AddProperty(PropertyName.inDZone, Variant.From(in inDZone));
|
|
info.AddProperty(PropertyName.controlling, Variant.From(in controlling));
|
|
info.AddProperty(PropertyName.splitEntity, Variant.From(in splitEntity));
|
|
info.AddProperty(PropertyName.bullet, Variant.From(in bullet));
|
|
info.AddProperty(PropertyName.onPlatform, Variant.From(in onPlatform));
|
|
info.AddProperty(PropertyName.slide, Variant.From(in slide));
|
|
info.AddProperty(PropertyName.lastDelta, Variant.From(in lastDelta));
|
|
info.AddProperty(PropertyName.loaded, Variant.From(in loaded));
|
|
info.AddSignalEventDelegate(SignalName.WasHurt, backing_WasHurt);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override void RestoreGodotObjectData(GodotSerializationInfo info)
|
|
{
|
|
base.RestoreGodotObjectData(info);
|
|
if (info.TryGetProperty(PropertyName.DWOverlay, out var value))
|
|
{
|
|
DWOverlay = value.As<Sprite2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.soul, out var value2))
|
|
{
|
|
soul = value2.As<Sprite2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.soulHitbox, out var value3))
|
|
{
|
|
soulHitbox = value3.As<Area2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.overlayAnim, out var value4))
|
|
{
|
|
overlayAnim = value4.As<AnimationPlayer>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.interact, out var value5))
|
|
{
|
|
interact = value5.As<ShapeCast2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.canInput, out var value6))
|
|
{
|
|
canInput = value6.As<bool>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.run, out var value7))
|
|
{
|
|
run = value7.As<bool>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.waitForMove, out var value8))
|
|
{
|
|
waitForMove = value8.As<bool>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.lockMenu, out var value9))
|
|
{
|
|
lockMenu = value9.As<bool>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.inputCD, out var value10))
|
|
{
|
|
inputCD = value10.As<float>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.dangerZoneCD, out var value11))
|
|
{
|
|
dangerZoneCD = value11.As<float>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.iFrames, out var value12))
|
|
{
|
|
iFrames = value12.As<float>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.stepCD, out var value13))
|
|
{
|
|
stepCD = value13.As<float>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.inDZone, out var value14))
|
|
{
|
|
inDZone = value14.As<DangerZone>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.controlling, out var value15))
|
|
{
|
|
controlling = value15.As<Entity>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.splitEntity, out var value16))
|
|
{
|
|
splitEntity = value16.As<Entity>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.bullet, out var value17))
|
|
{
|
|
bullet = value17.As<Node2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.onPlatform, out var value18))
|
|
{
|
|
onPlatform = value18.As<Node2D>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.slide, out var value19))
|
|
{
|
|
slide = value19.As<Slide>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.lastDelta, out var value20))
|
|
{
|
|
lastDelta = value20.As<Vector2>();
|
|
}
|
|
if (info.TryGetProperty(PropertyName.loaded, out var value21))
|
|
{
|
|
loaded = value21.As<bool>();
|
|
}
|
|
if (info.TryGetSignalEventDelegate<WasHurtEventHandler>(SignalName.WasHurt, out var value22))
|
|
{
|
|
backing_WasHurt = value22;
|
|
}
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
internal new static List<MethodInfo> GetGodotSignalList()
|
|
{
|
|
return new List<MethodInfo>(1)
|
|
{
|
|
new MethodInfo(SignalName.WasHurt, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null)
|
|
};
|
|
}
|
|
|
|
protected void EmitSignalWasHurt()
|
|
{
|
|
EmitSignal(SignalName.WasHurt);
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override void RaiseGodotClassSignalCallbacks(in godot_string_name signal, NativeVariantPtrArgs args)
|
|
{
|
|
if (signal == SignalName.WasHurt && args.Count == 0)
|
|
{
|
|
backing_WasHurt?.Invoke();
|
|
}
|
|
else
|
|
{
|
|
base.RaiseGodotClassSignalCallbacks(in signal, args);
|
|
}
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected override bool HasGodotClassSignal(in godot_string_name signal)
|
|
{
|
|
if (signal == SignalName.WasHurt)
|
|
{
|
|
return true;
|
|
}
|
|
return base.HasGodotClassSignal(in signal);
|
|
}
|
|
}
|