using System.Collections.Generic; using System.ComponentModel; using Godot; using Godot.Bridge; using Godot.NativeInterop; [ScriptPath("res://Scripts/Bullets/GearDuo.cs")] public partial class GearDuo : Control { [Export(PropertyHint.None, "")] private Node2D warning; [Export(PropertyHint.None, "")] private Node2D gearObj; [Export(PropertyHint.None, "")] private AnimationPlayer gearAnim; [Export(PropertyHint.None, "")] private float time = 25f; private float cd; public override void _EnterTree() { base.Size = new Vector2(BattleDR.current.activeBoard.boardSize.X - 6f, BattleDR.current.activeBoard.boardSize.Y - 6f); base.Position = base.Size / -2f; } public override void _Process(double delta) { if (cd > 0f) { cd -= Main.deltaTime; } else if (cd > -50f) { cd = -100f; gearObj.GlobalPosition = new Vector2(gearObj.GlobalPosition.X, BattleDR.current.soul.GlobalPosition.Y); gearAnim.Play("Gear"); } } public void ResetTimer() { cd = time; } public void Shake() { CameraController.Shake(10f); } }