Stop() public méthode

Stop executing commands in this Block.
public Stop ( ) : void
Résultat void
Exemple #1
0
 public virtual void StopParentBlock()
 {
     OnExit();
     if (parentBlock != null)
     {
         parentBlock.Stop();
     }
 }
Exemple #2
0
        protected void PlayCommand()
        {
            Block     targetBlock = target as Block;
            Flowchart flowchart   = targetBlock.GetFlowchart();
            Command   command     = flowchart.selectedCommands[0];

            if (targetBlock.IsExecuting())
            {
                // The Block is already executing.
                // Tell the Block to stop, wait a little while so the executing command has a
                // chance to stop, and then start execution again from the new command.
                targetBlock.Stop();
                flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.commandIndex, 0.2f));
            }
            else
            {
                // Block isn't executing yet so can start it now.
                flowchart.ExecuteBlock(targetBlock, command.commandIndex);
            }
        }
Exemple #3
0
        public override void OnEnter()
        {
            if (blockName.Value == "")
            {
                Continue();
            }

            if (flowchart == null)
            {
                flowchart = GetFlowchart();
            }

            Block block = flowchart.FindBlock(blockName.Value);

            if (block == null ||
                !block.IsExecuting())
            {
                Continue();
            }

            block.Stop();

            Continue();
        }