Exemplo n.º 1
0
	// Use this for initialization
	void Start () {
        // Get application main class
        app = Camera.main.GetComponent<CExample3>();
        // Get this bullet's sprite class
        sprite = GetComponent<OTSprite>();
        // Set this sprite's collision delegate
        // HINT : We could use sprite.InitCallBacks(this) as well.
        // but because delegates are the C# way we will use this technique
        sprite.onCollision = OnCollision;
	}
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     // Get application main class
     app = Camera.main.GetComponent <CExample3>();
     // Get this bullet's sprite class
     sprite = GetComponent <OTSprite>();
     // Set this sprite's collision delegate
     // HINT : We could use sprite.InitCallBacks(this) as well.
     // but because delegates are the C# way we will use this technique
     sprite.onCollision = OnCollision;
 }