Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eusth committed Apr 25, 2017
1 parent 19ff8cd commit 29fac8c
Show file tree
Hide file tree
Showing 12 changed files with 457 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -28,3 +28,8 @@ sysinfo.txt
# Builds
*.apk
*.unitypackage

*.exe
*.suo
*/bin
*/obj
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "VRGIN"]
path = VRGIN
url = git@github.com:Eusth/VRGIN.git
Binary file added Libs/IPA/IPA/Data/Managed/IllusionInjector.dll
Binary file not shown.
Binary file added Libs/IPA/IPA/Data/Managed/IllusionPlugin.dll
Binary file not shown.
178 changes: 178 additions & 0 deletions Libs/IPA/IPA/Data/Managed/IllusionPlugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Libs/IPA/Mono.Cecil.dll
Binary file not shown.
1 change: 1 addition & 0 deletions VRGIN
Submodule VRGIN added at 31ef1c
82 changes: 82 additions & 0 deletions VRGIN.Template/ConfigurableContext.cs
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using UnityEngine;
using VRGIN.Controls.Speech;
using VRGIN.Core;
using VRGIN.Visuals;

namespace VRGIN.Template
{
/// <summary>
/// Context class that can be serialized as an XML. Normally, you would implement this yourself and simply override getters with sensible values.
/// </summary>
[XmlRoot("Context")]
public class ConfigurableContext : IVRManagerContext
{
DefaultMaterialPalette _Materials;
VRSettings _Settings;

public ConfigurableContext()
{
// We'll keep those always the same
_Materials = new DefaultMaterialPalette();
_Settings = VRSettings.Load<VRSettings>("VRSettings.xml");

// Set defaults
ConfineMouse = true;
EnforceDefaultGUIMaterials = true;
GUIAlternativeSortingMode = false;
GuiLayer = "Default";
GuiFarClipPlane = 1000f;
GuiNearClipPlane = -1000f;
IgnoreMask = 0;
InvisibleLayer = "Ignore Raycast";
PrimaryColor = Color.cyan;
SimulateCursor = true;
UILayer = "UI";
UILayerMask = LayerMask.GetMask(UILayer);
UnitToMeter = 1f;
NearClipPlane = 0.1f;
}

[XmlIgnore]
public IMaterialPalette Materials { get { return _Materials; } }

[XmlIgnore]
public VRSettings Settings { get { return _Settings; } }

[XmlIgnore]
public Type VoiceCommandType { get { return typeof(VoiceCommand); } }

public bool ConfineMouse { get; set; }

public bool EnforceDefaultGUIMaterials { get; set; }

public bool GUIAlternativeSortingMode { get; set; }

public float GuiFarClipPlane { get; set; }

public string GuiLayer { get; set; }

public float GuiNearClipPlane { get; set; }

public int IgnoreMask { get; set; }

public string InvisibleLayer { get; set; }

public Color PrimaryColor { get; set; }

public bool SimulateCursor { get; set; }

public string UILayer { get; set; }

public int UILayerMask { get; set; }

public float UnitToMeter { get; set; }

public float NearClipPlane { get; set; }
}
}
26 changes: 26 additions & 0 deletions VRGIN.Template/GenericSeatedMode.cs
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VRGIN.Controls;
using VRGIN.Core;
using VRGIN.Helpers;
using VRGIN.Modes;

namespace VRGIN.Template
{
class GenericSeatedMode : SeatedMode
{
protected override IEnumerable<IShortcut> CreateShortcuts()
{
return base.CreateShortcuts().Concat(new IShortcut[] {
new MultiKeyboardShortcut(new KeyStroke("Ctrl+C"), new KeyStroke("Ctrl+C"), () => { VR.Manager.SetMode<GenericStandingMode>(); })
});
}

protected override void ChangeModeOnControllersDetected()
{
VR.Manager.SetMode<GenericStandingMode>();
}
}
}
21 changes: 21 additions & 0 deletions VRGIN.Template/GenericStandingMode.cs
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VRGIN.Controls;
using VRGIN.Core;
using VRGIN.Helpers;
using VRGIN.Modes;

namespace VRGIN.Template
{
class GenericStandingMode : StandingMode
{
protected override IEnumerable<IShortcut> CreateShortcuts()
{
return base.CreateShortcuts().Concat(new IShortcut[] {
new MultiKeyboardShortcut(new KeyStroke("Ctrl+C"), new KeyStroke("Ctrl+C"), () => { VR.Manager.SetMode<GenericSeatedMode>(); })
});
}
}
}
36 changes: 36 additions & 0 deletions VRGIN.Template/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VRGIN.Template")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VRGIN.Template")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1f634b93-f4c6-45e9-894d-2f3556a74d67")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 29fac8c

Please sign in to comment.