public override void Run(NCSContext context) { // int newPC = script.labels[args[1]]; int offset = int.Parse(args[1]); context.JumpOffset(offset, true); // context.Jump(newPC); }
public override void Run(NCSContext context) { // Moves forward a number of steps in the program // int newPC = script.labels[args[1]]; // context.programCounter = newPC; int offset = int.Parse(args[1]); context.JumpOffset(offset); }
public override void Run(NCSContext context) { string label = args[1]; // int offset = context.script.labels[label]; int stackTop = (int)context.Pop(); if (stackTop != 0) { // Jump to the label int offset = int.Parse(args[1]); context.JumpOffset(offset); } }
public override void Run(NCSContext context) { // string label = args[1]; // int offset = context.script.labels[label]; object top = context.Pop(); UnityEngine.Debug.Log("Top of stack: " + top); int stackTop = (int)top; if (stackTop == 0) { // Jump to the label int offset = int.Parse(args[1]); context.JumpOffset(offset); } }