This file contains hidden or 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 System.Collections.Generic; | |
using System; | |
using HutongGames.PlayMaker; | |
using HutongGames.PlayMaker.Actions; | |
/// <summary> | |
/// Logs the animation state to the console. | |
/// </summary> | |
public class CharacterStateSender : MonoBehaviour { |
This file contains hidden or 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 System.Collections; | |
using HutongGames.PlayMaker; | |
public class ControllerSwipe : MonoBehaviour { | |
public float comfortZone = 70.0f; | |
public float minSwipeDist = 14.0f; | |
public float maxSwipeTime = 0.5f; | |
public float fastSwipeReaction = 15f; |
This file contains hidden or 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
Shader "Platogo/Curved" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_QOffset ("Offset", Vector) = (0,0,0,0) | |
_Dist ("Distance", Float) = 100.0 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
Pass | |
{ |
This file contains hidden or 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
/*global _, angular */ | |
/* | |
function send() { | |
var cb = new Callback("custom"); | |
SomeService.Send(cb.triggerSuccess, cb.triggerError, cb.triggerCustom); | |
return cb.remote(); | |
} | |
send() |
This file contains hidden or 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
Services.factory("LawnchairFactory", function($window, $log, $parse) { | |
return function(name, config) { | |
var collection = {}; | |
var array = []; | |
var isArray = config && config.isArray; | |
var idGetter = $parse((config && config.entryKey) ? config.entryKey : "id"); | |
var transformSave = (config && config.transformSave) ? config.transformSave : angular.identity; | |
var transformLoad = (config && config.transformLoad) ? config.transformLoad : angular.identity; | |
function getEntryId(entry){ |
This file contains hidden or 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
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType | |
{ | |
NSURL *url = [request URL]; // URL that was requested | |
NSLog(@"OpenUrl: %@", [request URL]); | |
// Test that URL scheme is either HTTP(S) | |
if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"] || [[url scheme] isEqualToString:@"fb"] || [[url scheme] isEqualToString:@"mailto"]) { | |
[[UIApplication sharedApplication] openURL:url]; // forward to application router | |
return NO; | |
} | |
else { |
This file contains hidden or 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 UnityEditor; | |
using UnityEngine; | |
using System.IO; | |
using System.Collections; | |
using System; | |
public class JSONTool : EditorWindow | |
{ | |
[MenuItem("Platogo/JSON Tool")] | |
public static void Init() |
This file contains hidden or 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 System.Collections.Generic; | |
using System.Collections; | |
using System.Reflection; | |
using System; | |
public class SerializeUtility | |
{ | |
public static ArrayList ArrayToArrayList<T, U>(T[] data, Converter<T, U> converter) | |
{ |
This file contains hidden or 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
// ADD IMPORTS: | |
// import android.webkit.WebSettings; | |
// import java.lang.reflect.Method; | |
// import java.lang.reflect.InvocationTargetException; | |
@Override | |
public void init() { | |
super.init(); | |
try { |