예제 #1
0
 public MineTask(IActor actor,
                 IActorTaskContext context,
                 IStaticObject staticObject,
                 IMineDepositMethod method) : base(actor, context)
 {
     _staticObject = staticObject ?? throw new ArgumentNullException(nameof(staticObject));
     _method       = method ?? throw new ArgumentNullException(nameof(method));
 }
예제 #2
0
 public MineTask([NotNull] IActor actor,
                 [NotNull] IStaticObject staticObject,
                 [NotNull] IMineDepositMethod method,
                 [NotNull] ISectorMap map) : base(actor)
 {
     _staticObject = staticObject ?? throw new ArgumentNullException(nameof(staticObject));
     _method       = method ?? throw new ArgumentNullException(nameof(method));
     _map          = map ?? throw new ArgumentNullException(nameof(map));
 }
예제 #3
0
        public void MineDeposit(IStaticObject deposit, IMineDepositMethod method)
        {
            if (deposit is null)
            {
                throw new ArgumentNullException(nameof(deposit));
            }

            if (method is null)
            {
                throw new ArgumentNullException(nameof(method));
            }

            var openResult = method.TryMine(deposit.GetModule <IPropDepositModule>());

            DoMineDeposit(deposit, openResult);
        }