Пример #1
0
        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();
        }