2025-05-03 20:36:17 +08:00

1766 lines
51 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Godot;
using Godot.Bridge;
using Godot.Collections;
using Godot.NativeInterop;
[ScriptPath("res://Scripts/Entities/Entity.cs")]
public class Entity : CharacterBody2D
{
public enum IDs
{
None = -1,
Clover,
Kanako,
Martlet,
Ceroba,
Chujin,
Starlo,
Ed,
Mooch,
Moray,
Ace,
Dina,
Mo,
Axis,
June,
Melody,
Dalv,
TestEnemy,
Penceller,
Eraserhead,
Bearing,
Pennilton,
BellBoss,
Necklace,
Mopper,
Warden,
BackpackDarkner,
KeychainDarkner,
JacketDarkner,
MP3Darkner,
PenGuy,
UNUSED,
FoxBoss,
CarDarkner,
BBallDarkner,
ThumbtackDarkner,
CoinDarkner,
Decibat,
Virgil,
Kangaroo,
Cat,
Pyramid,
Mirror,
Scroll,
Fly,
PencilLizard,
AntKid,
TinfoilLizard,
HorseGirl,
DeerGirl,
TravellerM,
TravellerF,
RichGuy,
RichWoman,
Aunt,
Snake,
Cactus,
TechGuy,
Golem,
StarloBrother,
StarloDad,
StarloMom,
GreenBear,
RadDude,
Dunebud,
Horse,
PyramidBug,
Doctor,
BlueTriangle,
TallAntlerGirl,
BlueFire,
CursorMan,
IceCreamGuy,
DemonGuy,
Squid,
Bunny,
KidR,
KidB,
KidG,
MuscleGuy,
SadGirl,
SittingGuy,
MagmaBug,
CloakAntlerGirl,
CactusGirl,
FortuneTeller,
EyeballGuy,
MailWhale,
Gizmo,
Mocha,
Britz,
Violetta,
Rosa,
Pedla,
Conner,
Gearzerd,
Toaster,
Capacitor,
Stapler,
BigAxis,
Wrench,
RedLetter,
Batter,
BunBun,
Drill,
Toaster2,
LegoGreen,
LegoPink,
LegoBlue,
LegoOrange,
LegoBull,
KanakoPC,
RangerRed,
RangerGreen,
RangerBlue,
CameraMan,
Ruler,
BlueFireGuy,
MinerGF,
SmokerMiner,
HatMinerGuy,
GemMinerGuy,
HappyMinerGirl,
TeaBull,
MorayDad,
MorayMom,
SittingBunnyGuy,
ElevatorMinerGuy,
NervousGirl,
Blackjack
}
public enum Emoticons
{
Exclaim,
Question,
Dots
}
public enum Animations
{
Override = -2,
None,
Idle,
Walk,
Run,
Jumped,
ReadyJump,
JumpIn,
Fallen,
BattleStart,
Hurt,
BattleIdle,
Sweep,
BattleEnd,
AttackReady,
SkillReady,
SkillDo,
ActReady,
ActDo,
ItemReady,
ItemDo,
Defend,
KO,
Slide,
Sit,
Attack,
Back,
HandRaise,
Talk,
Elec,
Fainted,
Sleep,
Special
}
public enum Direction
{
South = 0,
North = 1,
East = 2,
West = 3,
Side = 4,
None = -1
}
public enum AnimMods
{
None,
DW,
Hat,
Talk,
DWTalk,
Counter
}
[Signal]
public delegate void AnimSignalEventHandler();
public class AutoMove
{
public Vector2[] pos;
public int current;
public float failsafe;
public float speed = 1f;
public bool doFacing = true;
public bool doFailsafe = true;
public bool dontTP;
public Animations moving = Animations.Walk;
public Animations stop;
public Direction dirAtEnd = Direction.None;
public const float maxFailsafe = 300f;
}
public new class MethodName : CharacterBody2D.MethodName
{
public new static readonly StringName _EnterTree = "_EnterTree";
public static readonly StringName LateStart = "LateStart";
public new static readonly StringName _Process = "_Process";
public static readonly StringName ShakeAnimChange = "ShakeAnimChange";
public static readonly StringName Shake = "Shake";
public static readonly StringName Emoticon = "Emoticon";
public static readonly StringName DoAutoMove = "DoAutoMove";
public static readonly StringName TryUpdateComponents = "TryUpdateComponents";
public static readonly StringName ClearTrailObjs = "ClearTrailObjs";
public static readonly StringName ChangeDirection = "ChangeDirection";
public static readonly StringName DoAutoAlign = "DoAutoAlign";
public static readonly StringName ChangeMod = "ChangeMod";
public static readonly StringName UpdateTrail = "UpdateTrail";
public new static readonly StringName _PhysicsProcess = "_PhysicsProcess";
public static readonly StringName LateUpdate = "LateUpdate";
public static readonly StringName UpdateAnim = "UpdateAnim";
public new static readonly StringName LookAt = "LookAt";
public static readonly StringName StopMoving = "StopMoving";
}
public new class PropertyName : CharacterBody2D.PropertyName
{
public static readonly StringName id = "id";
public static readonly StringName baseSpeed = "baseSpeed";
public static readonly StringName asymmetrical = "asymmetrical";
public static readonly StringName singleDirection = "singleDirection";
public static readonly StringName direction = "direction";
public static readonly StringName doTrail = "doTrail";
public static readonly StringName skipFirstAnim = "skipFirstAnim";
public static readonly StringName animMod = "animMod";
public static readonly StringName emoticonOffset = "emoticonOffset";
public static readonly StringName texOverrides = "texOverrides";
public static readonly StringName replaceAnim = "replaceAnim";
public static readonly StringName talkOverride = "talkOverride";
public static readonly StringName idleOverride = "idleOverride";
public static readonly StringName currentAnim = "currentAnim";
public static readonly StringName spriteSideOffset = "spriteSideOffset";
public static readonly StringName extras = "extras";
public static readonly StringName anim = "anim";
public static readonly StringName sprite = "sprite";
public static readonly StringName collider = "collider";
public static readonly StringName trigger = "trigger";
public static readonly StringName emoticonObj = "emoticonObj";
public static readonly StringName startPos = "startPos";
public static readonly StringName battleData = "battleData";
public static readonly StringName oldAnim = "oldAnim";
public static readonly StringName shake = "shake";
public static readonly StringName shakeIntensity = "shakeIntensity";
public static readonly StringName trail = "trail";
public static readonly StringName currentTrail = "currentTrail";
public static readonly StringName trailCD = "trailCD";
}
public new class SignalName : CharacterBody2D.SignalName
{
public static readonly StringName AnimSignal = "AnimSignal";
}
[Export(PropertyHint.None, "")]
public IDs id;
[Export(PropertyHint.None, "")]
public float baseSpeed = 64f;
[Export(PropertyHint.None, "")]
public bool asymmetrical;
[Export(PropertyHint.None, "")]
public bool singleDirection;
[Export(PropertyHint.None, "")]
public Direction direction;
[Export(PropertyHint.None, "")]
public bool doTrail;
[Export(PropertyHint.None, "")]
public bool skipFirstAnim;
[Export(PropertyHint.None, "")]
public AnimMods animMod;
[Export(PropertyHint.None, "")]
public Vector2 emoticonOffset = new Vector2(0f, -40f);
[Export(PropertyHint.None, "")]
private Array<Array<Variant>> texOverrides;
[Export(PropertyHint.None, "")]
public Array<Array<Variant>> replaceAnim = new Array<Array<Variant>>();
[Export(PropertyHint.None, "")]
public string talkOverride;
[Export(PropertyHint.None, "")]
public string idleOverride;
[Export(PropertyHint.None, "")]
public Animations currentAnim;
[Export(PropertyHint.None, "")]
private Vector2[] spriteSideOffset;
[Export(PropertyHint.None, "")]
public Node[] extras;
[ExportSubgroup("Components", "")]
[Export(PropertyHint.None, "")]
public AnimationPlayer anim;
[Export(PropertyHint.None, "")]
public Sprite2D sprite;
[Export(PropertyHint.None, "")]
public CollisionShape2D collider;
[Export(PropertyHint.None, "")]
public Area2D trigger;
public Node emoticonObj;
public Vector2 startPos;
public Battlers battleData;
public Animations oldAnim = Animations.None;
public float shake;
public float shakeIntensity = 5f;
private Sprite2D[] trail;
private int currentTrail;
private float trailCD;
public AutoMove moving;
private const float trailDelay = 2f;
private const float defaultShakeIntensity = 5f;
private const string noiseSound = "snd_wing_ch1.wav";
private static readonly HashSet<Animations> flippable = new HashSet<Animations>
{
Animations.Idle,
Animations.Walk,
Animations.Run,
Animations.Sit,
Animations.Talk
};
public static readonly System.Collections.Generic.Dictionary<Vector2, Direction> directions = new System.Collections.Generic.Dictionary<Vector2, Direction>
{
{
Vector2I.Up,
Direction.North
},
{
Vector2I.Down,
Direction.South
},
{
Vector2I.Left,
Direction.East
},
{
Vector2I.Right,
Direction.West
},
{
new Vector2I(1, -1),
Direction.North
},
{
new Vector2I(-1, -1),
Direction.North
},
{
new Vector2I(1, 1),
Direction.South
},
{
new Vector2I(-1, 1),
Direction.South
}
};
private AnimSignalEventHandler backing_AnimSignal;
public event AnimSignalEventHandler AnimSignal
{
add
{
backing_AnimSignal = (AnimSignalEventHandler)Delegate.Combine(backing_AnimSignal, value);
}
remove
{
backing_AnimSignal = (AnimSignalEventHandler)Delegate.Remove(backing_AnimSignal, value);
}
}
public override void _EnterTree()
{
TryUpdateComponents();
base.MotionMode = MotionModeEnum.Floating;
CallDeferred(MethodName.LateStart);
}
private void LateStart()
{
startPos = base.GlobalPosition;
}
public override void _Process(double delta)
{
DoAutoMove();
if (sprite != null)
{
if (shake > 0f || shake == -200f)
{
sprite.Position = Vector2.Right * Mathf.RoundToInt(Main.RandomRange(0f - shakeIntensity, shakeIntensity));
if (shake > 0f)
{
shake -= Main.deltaTime;
}
}
else if (shake > -50f)
{
sprite.Position = Vector2.Zero;
shake = -100f;
}
}
CallDeferred(MethodName.LateUpdate);
}
public void ShakeAnimChange(string anim, float time = 10f, float intensity = 1f, string sound = "snd_wing_ch1.wav")
{
this.anim.Play(anim);
Shake(time, intensity);
if (sound != null)
{
Audio.PlaySound(sound);
}
}
public void ShakeAnimChange(Animations anim, float time = 10f, float intensity = 1f, string sound = "snd_wing_ch1.wav")
{
currentAnim = anim;
Shake(time, intensity);
if (sound != null)
{
Audio.PlaySound(sound);
}
}
public void Shake(float time, float intensity = -1f)
{
shake = time;
if (intensity > 0f)
{
shakeIntensity = intensity;
}
else
{
shakeIntensity = 5f;
}
}
public Node Emoticon(Emoticons type, bool sound = false)
{
emoticonObj = Main.Particle("Emoticon" + type, base.GlobalPosition + emoticonOffset, 0, this, localSpace: false);
if (sound && type == Emoticons.Exclaim)
{
Audio.PlaySound("snd_b.wav");
}
return emoticonObj;
}
private void DoAutoMove()
{
if (moving == null)
{
return;
}
float num = base.GlobalPosition.DistanceTo(moving.pos[moving.current]);
if (num < 1.5f || (moving.doFailsafe && moving.failsafe >= 300f))
{
if (!moving.dontTP)
{
base.GlobalPosition = moving.pos[moving.current];
}
moving.current++;
moving.failsafe = 0f;
if (moving.current >= moving.pos.Length)
{
if (moving.stop != Animations.None)
{
currentAnim = moving.stop;
}
if (moving.dirAtEnd != Direction.None)
{
direction = moving.dirAtEnd;
UpdateAnim(force: true);
}
StopMoving();
}
}
else
{
Vector2 vector = base.GlobalPosition.DirectionTo(moving.pos[moving.current]);
base.Velocity = vector * moving.speed * baseSpeed * Mathf.Min(num / 5f, 1f);
if (moving.moving != Animations.None)
{
currentAnim = moving.moving;
}
if (moving.doFailsafe)
{
moving.failsafe += Main.deltaTime;
}
if (moving.doFacing)
{
LookAt(moving.pos[moving.current]);
}
}
}
public void TryUpdateComponents(bool force = false)
{
for (int i = 0; i < 4; i++)
{
Node child = GetChild(i);
if ((force || !GodotObject.IsInstanceValid(anim)) && child is AnimationPlayer animationPlayer)
{
anim = animationPlayer;
}
else if ((force || !GodotObject.IsInstanceValid(sprite)) && child is Sprite2D sprite2D)
{
sprite = sprite2D;
}
else if ((force || !GodotObject.IsInstanceValid(collider)) && child is CollisionShape2D collisionShape2D)
{
collider = collisionShape2D;
}
else if ((force || !GodotObject.IsInstanceValid(trigger)) && child is Area2D area2D)
{
trigger = area2D;
}
}
}
public void ClearTrailObjs()
{
if (trail != null)
{
for (int i = 0; i < trail.Length; i++)
{
trail[i].QueueFree();
}
trail = null;
}
}
public void ChangeDirection(Direction dir)
{
direction = dir;
UpdateAnim(force: true);
}
public void DoAutoMove(Vector2[] target, float speed = 1f, Animations moveAnim = Animations.Walk, Animations stopAnim = Animations.Idle)
{
moving = new AutoMove
{
pos = target,
speed = speed,
moving = moveAnim,
stop = stopAnim
};
}
public void DoAutoAlign(Vector2 pos, float speed = 1f, Animations moveAnim = Animations.Walk, Animations stopAnim = Animations.Idle)
{
Vector2[] array = new Vector2[2];
if (Common.Distance(pos.X, base.GlobalPosition.X) < Common.Distance(pos.Y, base.GlobalPosition.Y))
{
array[0] = new Vector2(pos.X, base.GlobalPosition.Y);
}
else
{
array[0] = new Vector2(base.GlobalPosition.X, pos.Y);
}
array[1] = pos;
DoAutoMove(array, speed, moveAnim, stopAnim);
}
public void DoAutoMove(Vector2 target, float speed = 1f, Animations moveAnim = Animations.Walk, Animations stopAnim = Animations.Idle)
{
DoAutoMove(new Vector2[1] { target }, speed, moveAnim, stopAnim);
}
public void ChangeMod(int mod)
{
animMod = (AnimMods)mod;
}
private void UpdateTrail()
{
if (doTrail && trail == null)
{
trail = new Sprite2D[3];
for (int i = 0; i < trail.Length; i++)
{
AddChild(trail[i] = new Sprite2D
{
Name = "Trail" + i,
Visible = false,
TopLevel = true
}, forceReadableName: false, InternalMode.Disabled);
}
}
if (trailCD > 0f)
{
trailCD -= 1f;
}
else if (trailCD > -50f)
{
if (doTrail)
{
trail[currentTrail].Visible = true;
trail[currentTrail].Texture = sprite.Texture;
trail[currentTrail].Hframes = sprite.Hframes;
trail[currentTrail].Vframes = sprite.Vframes;
trail[currentTrail].FlipH = sprite.FlipH;
trail[currentTrail].Frame = sprite.Frame;
trail[currentTrail].Offset = sprite.Offset;
trail[currentTrail].SelfModulate = Main.colorTransparent;
trail[currentTrail].GlobalPosition = sprite.GlobalPosition;
trail[currentTrail].ZIndex = 3000;
trail[currentTrail].RegionEnabled = sprite.RegionEnabled;
trail[currentTrail].RegionRect = sprite.RegionRect;
currentTrail++;
if (currentTrail >= trail.Length)
{
currentTrail = 0;
}
trailCD = 2f;
}
else if (trail != null)
{
for (int j = 0; j < trail.Length; j++)
{
trail[j].Visible = false;
}
trailCD = -100f;
}
}
else if (doTrail)
{
trailCD = 0f;
}
}
public override void _PhysicsProcess(double delta)
{
if (base.Velocity != Vector2.Zero)
{
MoveAndSlide();
}
}
public virtual void LateUpdate()
{
UpdateAnim();
UpdateTrail();
}
public void UpdateAnim(bool force = false)
{
if (sprite == null || anim == null || currentAnim == Animations.Override)
{
return;
}
if (skipFirstAnim)
{
skipFirstAnim = false;
oldAnim = currentAnim;
}
else
{
if (!force && currentAnim == oldAnim)
{
return;
}
oldAnim = currentAnim;
StringBuilder stringBuilder = new StringBuilder("");
if (currentAnim == Animations.Idle)
{
string text = idleOverride;
if (text != null && text.Length > 0)
{
anim.Play(idleOverride);
return;
}
}
if (BattleDR.current == null)
{
if (flippable.Contains(currentAnim))
{
if (singleDirection)
{
sprite.FlipH = direction == Direction.West;
}
else if (!asymmetrical && (direction == Direction.East || direction == Direction.West))
{
stringBuilder.Append("Side");
sprite.FlipH = direction == Direction.West;
}
else
{
stringBuilder.Append(direction.ToString());
sprite.FlipH = false;
}
}
else
{
sprite.FlipH = false;
}
}
Vector2[] array = spriteSideOffset;
if (array != null && array.Length != 0)
{
sprite.Position = spriteSideOffset[sprite.FlipH ? 1u : 0u];
}
stringBuilder.Append(currentAnim.ToString());
Array<Array<Variant>> array2 = replaceAnim;
if (array2 != null && array2.Count > 0)
{
string c = stringBuilder.ToString();
Array<Variant> array3 = replaceAnim.FirstOrDefault((Array<Variant> x) => (string)x[0] == c);
if (array3 != null)
{
anim.Play((string)array3[1]);
return;
}
}
if (animMod != AnimMods.None && currentAnim < Animations.Run)
{
stringBuilder.Append(animMod.ToString());
}
StringName name = stringBuilder.ToString();
if (anim.HasAnimation(name))
{
anim.Play(name);
}
}
}
public void LookAt(Direction pos, bool forceAnimUpdate = false)
{
switch (pos)
{
case Direction.North:
LookAt(Vector2.Up, forceAnimUpdate);
break;
case Direction.South:
LookAt(Vector2.Down, forceAnimUpdate);
break;
case Direction.West:
LookAt(Vector2.Right, forceAnimUpdate);
break;
case Direction.East:
LookAt(Vector2.Left, forceAnimUpdate);
break;
}
}
public void LookAt(Vector2 pos, bool forceAnimUpdate = false)
{
if (pos == Vector2.Down || pos == Vector2.Left || pos == Vector2.Right || pos == Vector2.Up)
{
pos += base.GlobalPosition;
forceAnimUpdate = true;
}
Direction num = direction;
if (singleDirection)
{
if (pos.X > base.GlobalPosition.X)
{
direction = Direction.West;
}
else
{
direction = Direction.East;
}
}
else
{
Vector2 key = base.GlobalPosition.DirectionTo(pos).Snapped(Vector2.One);
direction = directions[key];
}
if (num != direction || forceAnimUpdate)
{
UpdateAnim(force: true);
}
}
public IEnumerator DelayedAnim(float waitTime, Animations anim, bool tempChange = false)
{
Animations c = currentAnim;
if (tempChange)
{
currentAnim = anim;
}
for (float a = 0f; a < waitTime; a += Main.deltaTime)
{
yield return null;
}
if (tempChange)
{
currentAnim = c;
}
else
{
currentAnim = anim;
}
}
public void StopMoving(Animations anim = Animations.None)
{
base.Velocity = Vector2.Zero;
if (moving != null)
{
moving = null;
}
if (anim != Animations.None)
{
currentAnim = anim;
}
}
public IEnumerator Slide(Vector2 direction, float frameTime, float speed = 1f, bool useSprite = false)
{
for (float a = 0f; a < frameTime; a += Main.deltaTime)
{
if (useSprite)
{
sprite.Position += direction * speed * Main.deltaTime;
}
else
{
base.Position += direction * speed * Main.deltaTime;
}
yield return null;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
internal static List<MethodInfo> GetGodotMethodList()
{
return new List<MethodInfo>(19)
{
new MethodInfo(MethodName._EnterTree, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
new MethodInfo(MethodName.LateStart, 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.ShakeAnimChange, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.String, "anim", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Float, "time", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Float, "intensity", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.String, "sound", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.Shake, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Float, "time", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Float, "intensity", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.Emoticon, new PropertyInfo(Variant.Type.Object, "", PropertyHint.None, "", PropertyUsageFlags.Default, new StringName("Node"), exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, "type", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Bool, "sound", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.DoAutoMove, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
new MethodInfo(MethodName.TryUpdateComponents, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Bool, "force", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.ClearTrailObjs, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null),
new MethodInfo(MethodName.ChangeDirection, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, "dir", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.DoAutoMove, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.PackedVector2Array, "target", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Float, "speed", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Int, "moveAnim", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Int, "stopAnim", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.DoAutoAlign, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Vector2, "pos", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Float, "speed", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Int, "moveAnim", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Int, "stopAnim", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.ChangeMod, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, "mod", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.UpdateTrail, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, 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.UpdateAnim, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Bool, "force", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.LookAt, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, "pos", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false),
new PropertyInfo(Variant.Type.Bool, "forceAnimUpdate", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false)
}, null),
new MethodInfo(MethodName.StopMoving, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, "anim", 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.LateStart && args.Count == 0)
{
LateStart();
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.ShakeAnimChange && args.Count == 4)
{
ShakeAnimChange(VariantUtils.ConvertTo<string>(in args[0]), VariantUtils.ConvertTo<float>(in args[1]), VariantUtils.ConvertTo<float>(in args[2]), VariantUtils.ConvertTo<string>(in args[3]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.Shake && args.Count == 2)
{
Shake(VariantUtils.ConvertTo<float>(in args[0]), VariantUtils.ConvertTo<float>(in args[1]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.Emoticon && args.Count == 2)
{
ret = VariantUtils.CreateFrom<Node>(Emoticon(VariantUtils.ConvertTo<Emoticons>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1])));
return true;
}
if (method == MethodName.DoAutoMove && args.Count == 0)
{
DoAutoMove();
ret = default(godot_variant);
return true;
}
if (method == MethodName.TryUpdateComponents && args.Count == 1)
{
TryUpdateComponents(VariantUtils.ConvertTo<bool>(in args[0]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.ClearTrailObjs && args.Count == 0)
{
ClearTrailObjs();
ret = default(godot_variant);
return true;
}
if (method == MethodName.ChangeDirection && args.Count == 1)
{
ChangeDirection(VariantUtils.ConvertTo<Direction>(in args[0]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.DoAutoMove && args.Count == 4)
{
DoAutoMove(VariantUtils.ConvertTo<Vector2[]>(in args[0]), VariantUtils.ConvertTo<float>(in args[1]), VariantUtils.ConvertTo<Animations>(in args[2]), VariantUtils.ConvertTo<Animations>(in args[3]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.DoAutoAlign && args.Count == 4)
{
DoAutoAlign(VariantUtils.ConvertTo<Vector2>(in args[0]), VariantUtils.ConvertTo<float>(in args[1]), VariantUtils.ConvertTo<Animations>(in args[2]), VariantUtils.ConvertTo<Animations>(in args[3]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.ChangeMod && args.Count == 1)
{
ChangeMod(VariantUtils.ConvertTo<int>(in args[0]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.UpdateTrail && args.Count == 0)
{
UpdateTrail();
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.UpdateAnim && args.Count == 1)
{
UpdateAnim(VariantUtils.ConvertTo<bool>(in args[0]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.LookAt && args.Count == 2)
{
LookAt(VariantUtils.ConvertTo<Direction>(in args[0]), VariantUtils.ConvertTo<bool>(in args[1]));
ret = default(godot_variant);
return true;
}
if (method == MethodName.StopMoving && args.Count == 1)
{
StopMoving(VariantUtils.ConvertTo<Animations>(in args[0]));
ret = default(godot_variant);
return true;
}
return base.InvokeGodotClassMethod(in method, args, out ret);
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override bool HasGodotClassMethod(in godot_string_name method)
{
if (method == MethodName._EnterTree)
{
return true;
}
if (method == MethodName.LateStart)
{
return true;
}
if (method == MethodName._Process)
{
return true;
}
if (method == MethodName.ShakeAnimChange)
{
return true;
}
if (method == MethodName.Shake)
{
return true;
}
if (method == MethodName.Emoticon)
{
return true;
}
if (method == MethodName.DoAutoMove)
{
return true;
}
if (method == MethodName.TryUpdateComponents)
{
return true;
}
if (method == MethodName.ClearTrailObjs)
{
return true;
}
if (method == MethodName.ChangeDirection)
{
return true;
}
if (method == MethodName.DoAutoAlign)
{
return true;
}
if (method == MethodName.ChangeMod)
{
return true;
}
if (method == MethodName.UpdateTrail)
{
return true;
}
if (method == MethodName._PhysicsProcess)
{
return true;
}
if (method == MethodName.LateUpdate)
{
return true;
}
if (method == MethodName.UpdateAnim)
{
return true;
}
if (method == MethodName.LookAt)
{
return true;
}
if (method == MethodName.StopMoving)
{
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.id)
{
id = VariantUtils.ConvertTo<IDs>(in value);
return true;
}
if (name == PropertyName.baseSpeed)
{
baseSpeed = VariantUtils.ConvertTo<float>(in value);
return true;
}
if (name == PropertyName.asymmetrical)
{
asymmetrical = VariantUtils.ConvertTo<bool>(in value);
return true;
}
if (name == PropertyName.singleDirection)
{
singleDirection = VariantUtils.ConvertTo<bool>(in value);
return true;
}
if (name == PropertyName.direction)
{
direction = VariantUtils.ConvertTo<Direction>(in value);
return true;
}
if (name == PropertyName.doTrail)
{
doTrail = VariantUtils.ConvertTo<bool>(in value);
return true;
}
if (name == PropertyName.skipFirstAnim)
{
skipFirstAnim = VariantUtils.ConvertTo<bool>(in value);
return true;
}
if (name == PropertyName.animMod)
{
animMod = VariantUtils.ConvertTo<AnimMods>(in value);
return true;
}
if (name == PropertyName.emoticonOffset)
{
emoticonOffset = VariantUtils.ConvertTo<Vector2>(in value);
return true;
}
if (name == PropertyName.texOverrides)
{
texOverrides = VariantUtils.ConvertToArray<Array<Variant>>(in value);
return true;
}
if (name == PropertyName.replaceAnim)
{
replaceAnim = VariantUtils.ConvertToArray<Array<Variant>>(in value);
return true;
}
if (name == PropertyName.talkOverride)
{
talkOverride = VariantUtils.ConvertTo<string>(in value);
return true;
}
if (name == PropertyName.idleOverride)
{
idleOverride = VariantUtils.ConvertTo<string>(in value);
return true;
}
if (name == PropertyName.currentAnim)
{
currentAnim = VariantUtils.ConvertTo<Animations>(in value);
return true;
}
if (name == PropertyName.spriteSideOffset)
{
spriteSideOffset = VariantUtils.ConvertTo<Vector2[]>(in value);
return true;
}
if (name == PropertyName.extras)
{
extras = VariantUtils.ConvertToSystemArrayOfGodotObject<Node>(in value);
return true;
}
if (name == PropertyName.anim)
{
anim = VariantUtils.ConvertTo<AnimationPlayer>(in value);
return true;
}
if (name == PropertyName.sprite)
{
sprite = VariantUtils.ConvertTo<Sprite2D>(in value);
return true;
}
if (name == PropertyName.collider)
{
collider = VariantUtils.ConvertTo<CollisionShape2D>(in value);
return true;
}
if (name == PropertyName.trigger)
{
trigger = VariantUtils.ConvertTo<Area2D>(in value);
return true;
}
if (name == PropertyName.emoticonObj)
{
emoticonObj = VariantUtils.ConvertTo<Node>(in value);
return true;
}
if (name == PropertyName.startPos)
{
startPos = VariantUtils.ConvertTo<Vector2>(in value);
return true;
}
if (name == PropertyName.battleData)
{
battleData = VariantUtils.ConvertTo<Battlers>(in value);
return true;
}
if (name == PropertyName.oldAnim)
{
oldAnim = VariantUtils.ConvertTo<Animations>(in value);
return true;
}
if (name == PropertyName.shake)
{
shake = VariantUtils.ConvertTo<float>(in value);
return true;
}
if (name == PropertyName.shakeIntensity)
{
shakeIntensity = VariantUtils.ConvertTo<float>(in value);
return true;
}
if (name == PropertyName.trail)
{
trail = VariantUtils.ConvertToSystemArrayOfGodotObject<Sprite2D>(in value);
return true;
}
if (name == PropertyName.currentTrail)
{
currentTrail = VariantUtils.ConvertTo<int>(in value);
return true;
}
if (name == PropertyName.trailCD)
{
trailCD = VariantUtils.ConvertTo<float>(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.id)
{
value = VariantUtils.CreateFrom(in id);
return true;
}
if (name == PropertyName.baseSpeed)
{
value = VariantUtils.CreateFrom(in baseSpeed);
return true;
}
if (name == PropertyName.asymmetrical)
{
value = VariantUtils.CreateFrom(in asymmetrical);
return true;
}
if (name == PropertyName.singleDirection)
{
value = VariantUtils.CreateFrom(in singleDirection);
return true;
}
if (name == PropertyName.direction)
{
value = VariantUtils.CreateFrom(in direction);
return true;
}
if (name == PropertyName.doTrail)
{
value = VariantUtils.CreateFrom(in doTrail);
return true;
}
if (name == PropertyName.skipFirstAnim)
{
value = VariantUtils.CreateFrom(in skipFirstAnim);
return true;
}
if (name == PropertyName.animMod)
{
value = VariantUtils.CreateFrom(in animMod);
return true;
}
if (name == PropertyName.emoticonOffset)
{
value = VariantUtils.CreateFrom(in emoticonOffset);
return true;
}
if (name == PropertyName.texOverrides)
{
value = VariantUtils.CreateFromArray(texOverrides);
return true;
}
if (name == PropertyName.replaceAnim)
{
value = VariantUtils.CreateFromArray(replaceAnim);
return true;
}
if (name == PropertyName.talkOverride)
{
value = VariantUtils.CreateFrom(in talkOverride);
return true;
}
if (name == PropertyName.idleOverride)
{
value = VariantUtils.CreateFrom(in idleOverride);
return true;
}
if (name == PropertyName.currentAnim)
{
value = VariantUtils.CreateFrom(in currentAnim);
return true;
}
if (name == PropertyName.spriteSideOffset)
{
value = VariantUtils.CreateFrom(in spriteSideOffset);
return true;
}
if (name == PropertyName.extras)
{
GodotObject[] array = extras;
value = VariantUtils.CreateFromSystemArrayOfGodotObject(array);
return true;
}
if (name == PropertyName.anim)
{
value = VariantUtils.CreateFrom(in anim);
return true;
}
if (name == PropertyName.sprite)
{
value = VariantUtils.CreateFrom(in sprite);
return true;
}
if (name == PropertyName.collider)
{
value = VariantUtils.CreateFrom(in collider);
return true;
}
if (name == PropertyName.trigger)
{
value = VariantUtils.CreateFrom(in trigger);
return true;
}
if (name == PropertyName.emoticonObj)
{
value = VariantUtils.CreateFrom(in emoticonObj);
return true;
}
if (name == PropertyName.startPos)
{
value = VariantUtils.CreateFrom(in startPos);
return true;
}
if (name == PropertyName.battleData)
{
value = VariantUtils.CreateFrom(in battleData);
return true;
}
if (name == PropertyName.oldAnim)
{
value = VariantUtils.CreateFrom(in oldAnim);
return true;
}
if (name == PropertyName.shake)
{
value = VariantUtils.CreateFrom(in shake);
return true;
}
if (name == PropertyName.shakeIntensity)
{
value = VariantUtils.CreateFrom(in shakeIntensity);
return true;
}
if (name == PropertyName.trail)
{
GodotObject[] array = trail;
value = VariantUtils.CreateFromSystemArrayOfGodotObject(array);
return true;
}
if (name == PropertyName.currentTrail)
{
value = VariantUtils.CreateFrom(in currentTrail);
return true;
}
if (name == PropertyName.trailCD)
{
value = VariantUtils.CreateFrom(in trailCD);
return true;
}
return base.GetGodotClassPropertyValue(in name, out value);
}
[EditorBrowsable(EditorBrowsableState.Never)]
internal static List<PropertyInfo> GetGodotPropertyList()
{
return new List<PropertyInfo>
{
new PropertyInfo(Variant.Type.Int, PropertyName.id, PropertyHint.Enum, "None:-1,Clover:0,Kanako:1,Martlet:2,Ceroba:3,Chujin:4,Starlo:5,Ed:6,Mooch:7,Moray:8,Ace:9,Dina:10,Mo:11,Axis:12,June:13,Melody:14,Dalv:15,TestEnemy:16,Penceller:17,Eraserhead:18,Bearing:19,Pennilton:20,BellBoss:21,Necklace:22,Mopper:23,Warden:24,BackpackDarkner:25,KeychainDarkner:26,JacketDarkner:27,MP3Darkner:28,PenGuy:29,UNUSED:30,FoxBoss:31,CarDarkner:32,BBallDarkner:33,ThumbtackDarkner:34,CoinDarkner:35,Decibat:36,Virgil:37,Kangaroo:38,Cat:39,Pyramid:40,Mirror:41,Scroll:42,Fly:43,PencilLizard:44,AntKid:45,TinfoilLizard:46,HorseGirl:47,DeerGirl:48,TravellerM:49,TravellerF:50,RichGuy:51,RichWoman:52,Aunt:53,Snake:54,Cactus:55,TechGuy:56,Golem:57,StarloBrother:58,StarloDad:59,StarloMom:60,GreenBear:61,RadDude:62,Dunebud:63,Horse:64,PyramidBug:65,Doctor:66,BlueTriangle:67,TallAntlerGirl:68,BlueFire:69,CursorMan:70,IceCreamGuy:71,DemonGuy:72,Squid:73,Bunny:74,KidR:75,KidB:76,KidG:77,MuscleGuy:78,SadGirl:79,SittingGuy:80,MagmaBug:81,CloakAntlerGirl:82,CactusGirl:83,FortuneTeller:84,EyeballGuy:85,MailWhale:86,Gizmo:87,Mocha:88,Britz:89,Violetta:90,Rosa:91,Pedla:92,Conner:93,Gearzerd:94,Toaster:95,Capacitor:96,Stapler:97,BigAxis:98,Wrench:99,RedLetter:100,Batter:101,BunBun:102,Drill:103,Toaster2:104,LegoGreen:105,LegoPink:106,LegoBlue:107,LegoOrange:108,LegoBull:109,KanakoPC:110,RangerRed:111,RangerGreen:112,RangerBlue:113,CameraMan:114,Ruler:115,BlueFireGuy:116,MinerGF:117,SmokerMiner:118,HatMinerGuy:119,GemMinerGuy:120,HappyMinerGirl:121,TeaBull:122,MorayDad:123,MorayMom:124,SittingBunnyGuy:125,ElevatorMinerGuy:126,NervousGirl:127,Blackjack:128", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Float, PropertyName.baseSpeed, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Bool, PropertyName.asymmetrical, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Bool, PropertyName.singleDirection, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Int, PropertyName.direction, PropertyHint.Enum, "South:0,North:1,East:2,West:3,Side:4,None:-1", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Bool, PropertyName.doTrail, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Bool, PropertyName.skipFirstAnim, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Int, PropertyName.animMod, PropertyHint.Enum, "None,DW,Hat,Talk,DWTalk,Counter", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Vector2, PropertyName.emoticonOffset, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Array, PropertyName.texOverrides, PropertyHint.TypeString, "28/0:", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Array, PropertyName.replaceAnim, PropertyHint.TypeString, "28/0:", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.String, PropertyName.talkOverride, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.String, PropertyName.idleOverride, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Int, PropertyName.currentAnim, PropertyHint.Enum, "Override:-2,None:-1,Idle:0,Walk:1,Run:2,Jumped:3,ReadyJump:4,JumpIn:5,Fallen:6,BattleStart:7,Hurt:8,BattleIdle:9,Sweep:10,BattleEnd:11,AttackReady:12,SkillReady:13,SkillDo:14,ActReady:15,ActDo:16,ItemReady:17,ItemDo:18,Defend:19,KO:20,Slide:21,Sit:22,Attack:23,Back:24,HandRaise:25,Talk:26,Elec:27,Fainted:28,Sleep:29,Special:30", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.PackedVector2Array, PropertyName.spriteSideOffset, PropertyHint.None, "", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Array, PropertyName.extras, PropertyHint.TypeString, "24/34:Node", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Nil, "Components", PropertyHint.None, "", PropertyUsageFlags.Subgroup, exported: true),
new PropertyInfo(Variant.Type.Object, PropertyName.anim, PropertyHint.NodeType, "AnimationPlayer", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Object, PropertyName.sprite, PropertyHint.NodeType, "Sprite2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Object, PropertyName.collider, PropertyHint.NodeType, "CollisionShape2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Object, PropertyName.trigger, PropertyHint.NodeType, "Area2D", PropertyUsageFlags.Default | PropertyUsageFlags.ScriptVariable, exported: true),
new PropertyInfo(Variant.Type.Object, PropertyName.emoticonObj, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Vector2, PropertyName.startPos, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Object, PropertyName.battleData, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Int, PropertyName.oldAnim, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Float, PropertyName.shake, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Float, PropertyName.shakeIntensity, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Array, PropertyName.trail, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Int, PropertyName.currentTrail, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false),
new PropertyInfo(Variant.Type.Float, PropertyName.trailCD, PropertyHint.None, "", PropertyUsageFlags.ScriptVariable, exported: false)
};
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void SaveGodotObjectData(GodotSerializationInfo info)
{
base.SaveGodotObjectData(info);
info.AddProperty(PropertyName.id, Variant.From(in id));
info.AddProperty(PropertyName.baseSpeed, Variant.From(in baseSpeed));
info.AddProperty(PropertyName.asymmetrical, Variant.From(in asymmetrical));
info.AddProperty(PropertyName.singleDirection, Variant.From(in singleDirection));
info.AddProperty(PropertyName.direction, Variant.From(in direction));
info.AddProperty(PropertyName.doTrail, Variant.From(in doTrail));
info.AddProperty(PropertyName.skipFirstAnim, Variant.From(in skipFirstAnim));
info.AddProperty(PropertyName.animMod, Variant.From(in animMod));
info.AddProperty(PropertyName.emoticonOffset, Variant.From(in emoticonOffset));
info.AddProperty(PropertyName.texOverrides, Variant.CreateFrom(texOverrides));
info.AddProperty(PropertyName.replaceAnim, Variant.CreateFrom(replaceAnim));
info.AddProperty(PropertyName.talkOverride, Variant.From(in talkOverride));
info.AddProperty(PropertyName.idleOverride, Variant.From(in idleOverride));
info.AddProperty(PropertyName.currentAnim, Variant.From(in currentAnim));
info.AddProperty(PropertyName.spriteSideOffset, Variant.From(in spriteSideOffset));
StringName name = PropertyName.extras;
GodotObject[] array = extras;
info.AddProperty(name, Variant.CreateFrom(array));
info.AddProperty(PropertyName.anim, Variant.From(in anim));
info.AddProperty(PropertyName.sprite, Variant.From(in sprite));
info.AddProperty(PropertyName.collider, Variant.From(in collider));
info.AddProperty(PropertyName.trigger, Variant.From(in trigger));
info.AddProperty(PropertyName.emoticonObj, Variant.From(in emoticonObj));
info.AddProperty(PropertyName.startPos, Variant.From(in startPos));
info.AddProperty(PropertyName.battleData, Variant.From(in battleData));
info.AddProperty(PropertyName.oldAnim, Variant.From(in oldAnim));
info.AddProperty(PropertyName.shake, Variant.From(in shake));
info.AddProperty(PropertyName.shakeIntensity, Variant.From(in shakeIntensity));
StringName name2 = PropertyName.trail;
array = trail;
info.AddProperty(name2, Variant.CreateFrom(array));
info.AddProperty(PropertyName.currentTrail, Variant.From(in currentTrail));
info.AddProperty(PropertyName.trailCD, Variant.From(in trailCD));
info.AddSignalEventDelegate(SignalName.AnimSignal, backing_AnimSignal);
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void RestoreGodotObjectData(GodotSerializationInfo info)
{
base.RestoreGodotObjectData(info);
if (info.TryGetProperty(PropertyName.id, out var value))
{
id = value.As<IDs>();
}
if (info.TryGetProperty(PropertyName.baseSpeed, out var value2))
{
baseSpeed = value2.As<float>();
}
if (info.TryGetProperty(PropertyName.asymmetrical, out var value3))
{
asymmetrical = value3.As<bool>();
}
if (info.TryGetProperty(PropertyName.singleDirection, out var value4))
{
singleDirection = value4.As<bool>();
}
if (info.TryGetProperty(PropertyName.direction, out var value5))
{
direction = value5.As<Direction>();
}
if (info.TryGetProperty(PropertyName.doTrail, out var value6))
{
doTrail = value6.As<bool>();
}
if (info.TryGetProperty(PropertyName.skipFirstAnim, out var value7))
{
skipFirstAnim = value7.As<bool>();
}
if (info.TryGetProperty(PropertyName.animMod, out var value8))
{
animMod = value8.As<AnimMods>();
}
if (info.TryGetProperty(PropertyName.emoticonOffset, out var value9))
{
emoticonOffset = value9.As<Vector2>();
}
if (info.TryGetProperty(PropertyName.texOverrides, out var value10))
{
texOverrides = value10.AsGodotArray<Array<Variant>>();
}
if (info.TryGetProperty(PropertyName.replaceAnim, out var value11))
{
replaceAnim = value11.AsGodotArray<Array<Variant>>();
}
if (info.TryGetProperty(PropertyName.talkOverride, out var value12))
{
talkOverride = value12.As<string>();
}
if (info.TryGetProperty(PropertyName.idleOverride, out var value13))
{
idleOverride = value13.As<string>();
}
if (info.TryGetProperty(PropertyName.currentAnim, out var value14))
{
currentAnim = value14.As<Animations>();
}
if (info.TryGetProperty(PropertyName.spriteSideOffset, out var value15))
{
spriteSideOffset = value15.As<Vector2[]>();
}
if (info.TryGetProperty(PropertyName.extras, out var value16))
{
extras = value16.AsGodotObjectArray<Node>();
}
if (info.TryGetProperty(PropertyName.anim, out var value17))
{
anim = value17.As<AnimationPlayer>();
}
if (info.TryGetProperty(PropertyName.sprite, out var value18))
{
sprite = value18.As<Sprite2D>();
}
if (info.TryGetProperty(PropertyName.collider, out var value19))
{
collider = value19.As<CollisionShape2D>();
}
if (info.TryGetProperty(PropertyName.trigger, out var value20))
{
trigger = value20.As<Area2D>();
}
if (info.TryGetProperty(PropertyName.emoticonObj, out var value21))
{
emoticonObj = value21.As<Node>();
}
if (info.TryGetProperty(PropertyName.startPos, out var value22))
{
startPos = value22.As<Vector2>();
}
if (info.TryGetProperty(PropertyName.battleData, out var value23))
{
battleData = value23.As<Battlers>();
}
if (info.TryGetProperty(PropertyName.oldAnim, out var value24))
{
oldAnim = value24.As<Animations>();
}
if (info.TryGetProperty(PropertyName.shake, out var value25))
{
shake = value25.As<float>();
}
if (info.TryGetProperty(PropertyName.shakeIntensity, out var value26))
{
shakeIntensity = value26.As<float>();
}
if (info.TryGetProperty(PropertyName.trail, out var value27))
{
trail = value27.AsGodotObjectArray<Sprite2D>();
}
if (info.TryGetProperty(PropertyName.currentTrail, out var value28))
{
currentTrail = value28.As<int>();
}
if (info.TryGetProperty(PropertyName.trailCD, out var value29))
{
trailCD = value29.As<float>();
}
if (info.TryGetSignalEventDelegate<AnimSignalEventHandler>(SignalName.AnimSignal, out var value30))
{
backing_AnimSignal = value30;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
internal static List<MethodInfo> GetGodotSignalList()
{
return new List<MethodInfo>(1)
{
new MethodInfo(SignalName.AnimSignal, new PropertyInfo(Variant.Type.Nil, "", PropertyHint.None, "", PropertyUsageFlags.Default, exported: false), MethodFlags.Normal, null, null)
};
}
protected void EmitSignalAnimSignal()
{
EmitSignal(SignalName.AnimSignal);
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void RaiseGodotClassSignalCallbacks(in godot_string_name signal, NativeVariantPtrArgs args)
{
if (signal == SignalName.AnimSignal && args.Count == 0)
{
backing_AnimSignal?.Invoke();
}
else
{
base.RaiseGodotClassSignalCallbacks(in signal, args);
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override bool HasGodotClassSignal(in godot_string_name signal)
{
if (signal == SignalName.AnimSignal)
{
return true;
}
return base.HasGodotClassSignal(in signal);
}
}