Skip to content

Instantly share code, notes, and snippets.

@BruceJillis
Created July 15, 2014 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BruceJillis/4789a3afb03325c01a90 to your computer and use it in GitHub Desktop.
Save BruceJillis/4789a3afb03325c01a90 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System;
using Random = UnityEngine.Random;
using System.Collections;
public class StartTween : MonoBehaviour {
public GameObject target;
void OnGUI() {
if (GUI.Button(new Rect(0,0,100,10), new GUIContent("Ok"))) {
Hashtable args = iTween.Hash(
"volume", 0,
"onComplete", "MessageMe"
);
iTween.AudioTo(target, args);
}
}
}
using UnityEngine;
using System;
using Random = UnityEngine.Random;
using System.Collections;
public class Test : MonoBehaviour {
void MessageMe () {
Debug.Log("I was messaged");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment