This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//click | |
if (TAB.TabContent.length != 0) | |
{ | |
for (var i=0; i< TAB.TabContent.length; i++) | |
{ | |
for (var j=0; j< TAB.TabContent[i].BeadsX.length; j++) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InteractionClient : IInteractionClient { | |
public InteractionInfo GetInteractionInfoAtLocation(int skeletonTrackingId, InteractionHandType handType, double x, double y) { | |
var info = new InteractionInfo(); | |
info.IsGripTarget = true; | |
info.IsPressTarget = false; | |
info.PressAttractionPointX = 0f; | |
info.PressAttractionPointY = 0f; | |
info.PressTargetControlId = 0; | |
return info; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interactionStream = new InteractionStream(Sensor, new InteractionClient()); | |
//..SNIP... | |
void ProcessDepthFrame() { | |
using (var dif = this.Sensor.DepthStream.OpenNextFrame(0)) { | |
if (dif != null) { | |
DepthImagePixel[] data = new DepthImagePixel[dif.PixelDataLength]; | |
dif.CopyDepthImagePixelDataTo(data); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private InteractionHandPointer getHandPointer() { | |
UserInfo userInfo; | |
var hand = JointType.HandLeft; | |
if (UserInfos.TryGetValue(Player.Skeleton.TrackingId, out userInfo)) { | |
return (from InteractionHandPointer hp in userInfo.HandPointers where hp.HandType == hand select hp).FirstOrDefault(); | |
} | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FROM http://www.glenstevens.ca/unity3d-best-practices/ | |
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
protected static T instance; | |
/** | |
Returns the instance of this singleton. | |
*/ | |
public static T Instance | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class CreateScriptableObjectX { | |
[MenuItem( "Assets/Create/ScriptableObjectX" )] | |
public static void CreateAsset() { | |
ScriptableObjectUtility.CreateAsset<ScriptableObjectX>(); | |
} | |
} |