public void OnLoad(Key activator, Key selector, Key settings, Key bi)
 {
     myGO = new GameObject("MortimersScriptingMod");
     ScriptHandler sh = (ScriptHandler)myGO.AddComponent<ScriptHandler>();
     sh.SetKeys(activator, selector, settings, bi);
     myGO.AddComponent<DontDestroyOnLoady>();
 }
    public void CopyFrom(MouseOrbit o)
    {
      target = o.target;
      distance = o.distance;
      xSpeed = o.xSpeed;
      ySpeed = o.ySpeed;
      yMinLimit = o.yMinLimit;
      yMaxLimit = o.yMaxLimit;
      x = o.x;
      y = o.y;
      smooth = o.smooth;
      wasdPosOffset = o.wasdPosOffset;
      wasdSpeed = o.wasdSpeed;
      zoomSmooth = o.zoomSmooth;
      introDuration = o.introDuration;
      introXamount = o.introXamount;
      introYamount = o.introYamount;
      filmCamSmooth = o.filmCamSmooth;
      panSpeed = o.panSpeed;
      machineTarget = o.machineTarget;
      focusObject = o.focusObject;
      focusLerpSmooth = o.focusLerpSmooth;
      dofTarget = o.dofTarget;
      minZoom = o.minZoom;
      maxZoom = o.maxZoom;
      mouseSensitivityScaler = o.mouseSensitivityScaler;
      scrollSensitivityScaler = o.scrollSensitivityScaler;
      fixedCam = o.fixedCam;
      fixedCamObj = o.fixedCamObj;
      fixedCamLookAt = o.fixedCamLookAt;
      fixedCamLerpPosSpeed = o.fixedCamLerpPosSpeed;
      fixedCamLerpRotSpeed = o.fixedCamLerpRotSpeed;
      lerpedUpVector = o.lerpedUpVector;
      yPosClamp = o.yPosClamp;
      hud3Dcam = o.hud3Dcam;

      forward = Keybindings.Get("Forward");
      backward = Keybindings.Get("Backward");
      left = Keybindings.Get("Left");
      right = Keybindings.Get("Right");
      up = Keybindings.Get("Up");
      down = Keybindings.Get("Down");
      menu = Keybindings.Get("Menu");

      wasdSpeed = Configuration.GetFloat("wasdSpeed", wasdSpeed);
      scrollSensitivityScaler = Configuration.GetFloat("scrollSpeed",
        scrollSensitivityScaler);

      fov = Configuration.GetFloat("fov", Camera.main.fieldOfView);
    }
예제 #3
0
 public override void OnLoad()
 {
     String[] strs = Application.dataPath.Split('/');
     for (int i = 0; i < strs.Length - 1; i++)
     {
         str += strs[i] + "/";
     }
     File.Copy(Resource + "Plugins/x86/lua52.dll", str + "lua52.dll", true); 
     Key = Keybindings.AddKeybinding("Open scripting mod", Key);
     selecting = Keybindings.AddKeybinding("Selected gameobject", selecting);
     settingsGUI = Keybindings.AddKeybinding("Settings GUI", settingsGUI);
     blockInfo = Keybindings.AddKeybinding("Block Info", blockInfo);
     Commands.RegisterCommand("ScaleX", ScaleX, "Scales width of the Scripting Mod");
     Commands.RegisterCommand("ScaleY", ScaleY, "Scales heigth of the Scripting Mod");
     foreach (string s in _list)
     {
         Assembly.LoadFrom(Resource + s);
     }
     Assembly mod = Assembly.LoadFrom(Resource + "BesiegeScriptingMod.dll");
     bsmType = mod.GetType("BesiegeScriptingMod.BesiegeScriptingMod");
     bsm = Activator.CreateInstance(bsmType);
     bsmType.GetMethod("OnLoad").Invoke(bsm, new object[]{Key, selecting, settingsGUI, blockInfo});
 }
예제 #4
0
 public void SetKeys(Key key, Key key2, Key key3, Key key4)
 {
     _key = key;
     _selecting = key2;
     _settingsGui = key3;
     _blockInfo = key4;
 }
예제 #5
0
 internal void SetKey(Key key1)
 {
     settingsGUI = key1;
 }