47 lines
816 B
C#
47 lines
816 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using Godot;
|
|
using Godot.Bridge;
|
|
using Godot.NativeInterop;
|
|
|
|
[ScriptPath("res://Scripts/Bullets/DrillTriple.cs")]
|
|
public partial class DrillTriple : Control
|
|
{
|
|
[Export(PropertyHint.None, "")]
|
|
private Node2D pivot;
|
|
|
|
[Export(PropertyHint.None, "")]
|
|
private Blank[] drills;
|
|
|
|
public override void _EnterTree()
|
|
{
|
|
Blue();
|
|
}
|
|
|
|
private void Blue()
|
|
{
|
|
int num = Main.RandomRange(0, 2);
|
|
for (int i = 0; i < drills.Length; i++)
|
|
{
|
|
drills[i].grazed = false;
|
|
if (i == num)
|
|
{
|
|
drills[i].Modulate = Main.colorCyan;
|
|
drills[i].type = IBullet.Type.Blue;
|
|
}
|
|
else
|
|
{
|
|
drills[i].Modulate = Main.colorWhite;
|
|
drills[i].type = IBullet.Type.Normal;
|
|
}
|
|
}
|
|
}
|
|
|
|
public void Flip()
|
|
{
|
|
pivot.RotationDegrees += 180f;
|
|
Blue();
|
|
}
|
|
|
|
}
|