23 lines
582 B
C#
23 lines
582 B
C#
using Godot;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
public partial class Example2 : Action
|
|
{
|
|
public override void _Ready()
|
|
{
|
|
base._Ready();
|
|
}
|
|
|
|
public override void Fire()
|
|
{
|
|
base.Fire();
|
|
int shieldNumber = 2;
|
|
int damageAmount = Globals._rng.Next(-50,-30);
|
|
_contact._owner._board._shields[shieldNumber].ChangeHealth(damageAmount);
|
|
((Player)_contact._owner)._phone._debug.Text = "Shield " + shieldNumber + " damaged " + damageAmount + "hp";
|
|
}
|
|
}
|