示例#1
0
 public UserInput(Scripting.IMover mover, Scripting.ISoundPlayer soundPlayer,
                  Scripting.IItemPicker itemPicker, World.NavMeshes.NavMesh navMesh)
 {
     elapsedIgnoreMilliseconds = 0;
     ignoringInput             = false;
     interpreter  = new Scripting.PlayerInterpreter(mover, soundPlayer, itemPicker);
     this.navMesh = navMesh;
 }
 public PlayerInterpreter(Scripting.IMover mover,
                          Scripting.ISoundPlayer soundPlayer, Scripting.IItemPicker itemPicker)
 {
     this.mover       = mover;
     this.soundPlayer = soundPlayer;
     this.itemPicker  = itemPicker;
     dictionary       = new Dictionary <Instructions.OpCodes, Action <int> >();
     dictionary.Add(Instructions.OpCodes.PlaySound, PlaySound);
     dictionary.Add(Instructions.OpCodes.MoveTo, MoveTo);
     dictionary.Add(Instructions.OpCodes.IgnoreInput, IgnoreInput);
     dictionary.Add(Instructions.OpCodes.PickupBerry, PickupBerryAt);
     dictionary.Add(Instructions.OpCodes.PickupSunblock, PickupSunblockAt);
 }