Exemple #1
0
        Activity TryDeployTick(Actor self, out MiningState state)
        {
            // Wait for child wait activity to be done.
            // Could be wait or could be move to.
            if (ChildActivity != null)
            {
                ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
                state         = MiningState.TryDeploy;
                return(this);
            }

            if (!deploy.IsValidTerrain(self.Location))
            {
                // If we can't deploy, go back to scan state so that we scan try deploy again.
                state = MiningState.Scan;
                return(this);
            }

            // Issue deploy order and enter deploying state.
            //if (deploy. == DeployState.Undeployed)
            //{
            IsInterruptible = false;

            tranforms.DeployTransform(true);
            //}

            state = MiningState.Deploying;
            return(this);
        }
Exemple #2
0
        private void TryDeploy(Actor self, out MiningState state)
        {
            if (!deploy.IsValidTerrain(self.Location))
            {
                // If we can't deploy, go back to scan state so that we scan try deploy again.
                state = MiningState.Scan;
            }
            else
            {
                IsInterruptible = false;

                Activity transformsActivity = tranforms.GetTransformActivity(self);
                QueueChild(transformsActivity);

                state = MiningState.Deploying;
            }
        }