public override void Execute() { if (resource == null || resource.Equals(null) || resource.HealthPoints <= 0) { OnResourceGathered?.Invoke(); return; } if (!Utils.InRange(unit, unit.Target, unit.unitData.UnitRange)) { unit.ChangeState(typeof(ChaseState)); return; } GatherResource(); }