-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP_CyberFox.cs
More file actions
47 lines (43 loc) · 1.69 KB
/
P_CyberFox.cs
File metadata and controls
47 lines (43 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using FunkEngine;
using Godot;
public partial class P_CyberFox : EnemyPuppet
{
public static new readonly string LoadPath =
"res://Scenes/Puppets/Enemies/CyberFox/CyberFox.tscn";
[Export]
private GlitchScript _effectNode;
public override void _Ready()
{
MaxHealth = 130;
CurrentHealth = MaxHealth;
BaseMoney = 5;
base._Ready();
var enemTween = CreateTween();
enemTween.TweenProperty(Sprite, "position", Vector2.Right * 10, 0.5f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Up * 5, 0.25f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Down * 5, 0.25f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Left * 10, 0.5f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Up * 5, 0.25f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Down * 5, 0.25f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Up * 5, 0.25f).AsRelative();
enemTween.TweenProperty(Sprite, "position", Vector2.Down * 5, 0.25f).AsRelative();
enemTween.SetTrans(Tween.TransitionType.Bounce);
enemTween.SetEase(Tween.EaseType.InOut);
enemTween.SetLoops();
enemTween.Play();
BattleEvents = new EnemyEffect[]
{
new EnemyEffect(
this,
BattleEffectTrigger.OnLoop,
1,
(e, eff, val) =>
{
e.BD.AddStatus(Targetting.First, StatusEffect.Dodge, 1);
_effectNode.TriggerGlitch(1f);
}
),
};
}
}