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 System.Collections; | |
public class Rotator : MonoBehaviour { | |
private Vector3 lastMousePosition = Vector3.zero; | |
private bool mousePressed; | |
private Vector3 rotation = Vector3.zero; | |
private GameObject target = 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
/Library/ | |
/Temp/ | |
*.sln | |
*.pidb | |
*.csproj | |
*.unityproj | |
*.userprefs | |
*.swp | |
*~ |
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
set nocompatible | |
set showcmd | |
filetype on | |
filetype plugin on | |
syntax enable | |
set autoindent | |
set expandtab | |
set smarttab |
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
export PS1="\[\e[00;33m\]\t\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;32m\]\u@\[\e[0m\]\[\e[00;36m\]\h:\[\e[0m\]\[\e[00;35m\]\W\[\e[0m\]\[\e[00;31m\]\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]" | |
alias ls='ls -G' | |
export PATH=$PATH:/Applications/adt-bundle-mac-x86_64-20130917/sdk/platform-tools:/Applications/adt-bundle-mac-x86_64-20130917/sdk/tools:/Applications/apache-ant-1.9.2/bin |
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 System.Collections; | |
using System.Linq; | |
using System; | |
public class TestLinq : MonoBehaviour { | |
void Start () { | |
float[] values = new float[3] { 3, 5, 1}; | |
Debug.Log(values.Min()); |
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
import requests | |
import time | |
import threading | |
payload = { | |
'u_name': 'ken', | |
'email': 'kuanying@tradeserv.com', | |
'mobile': '0999000000', | |
'num1': '9999', | |
'o_num':'9999' |
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
import requests | |
import time | |
count = 0 | |
def write_file(text, path): | |
f = open(path, 'w+') | |
f.write(text.encode('utf8')) | |
f.close(); |
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 System.Collections; | |
public class Target : MonoBehaviour { | |
public void Awake() { | |
Debug.Log(this.GetType().Name + ".Awake() at frame " + | |
Time.frameCount); | |
} | |
public void Start() { | |
Debug.Log(this.GetType().Name + ".Start() at frame " + |
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 System.Collections; | |
public class Main : MonoBehaviour { | |
private GameObject prefab; | |
public void Update() { | |
Debug.Log(Time.frameCount); | |
if(Time.frameCount == 5) { | |
Load(); |
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 System.Collections; | |
public class TestWait : MonoBehaviour { | |
private bool hasTouched = false; | |
public IEnumerator Start() { | |
Debug.Log("1"); | |
yield return StartCoroutine(WaitForInput()); | |
Debug.Log("2"); |
OlderNewer