Inheritance: MonoBehaviour
Esempio n. 1
0
	void Awake(){
		var g = Instantiate (prefab, Vector3.zero, Quaternion.identity) as GameObject;
		g.transform.SetParentZeroed (this.transform);
		g.transform.localScale = scale;
		g.transform.localPosition = new Vector3 (0f, .5f, 0f);
		sspring = GetComponent<ScaleSpring> ();
		sspring.target = Vector3.zero;
		posspring = GetComponent<LocalPositionSpring> ();
	}
Esempio n. 2
0
 /// <summary>
 /// Play scale spring animation.
 /// </summary>
 public void Spring()
 {
     ScaleSpring.Begin(this, 1f, 1.1f, 40, 2);
 }