Example #1
0
 ///////////////////////////////////////////////////////////////////////////////////////////////
 void Awake()
 {
     foreach (GameObject crystal in this.crystals)
     {
         OnTriggerEnterListener listener = crystal.AddComponent <OnTriggerEnterListener>();
         listener.onTriggerEnterDelegate = CrystalCollected;
     }
 }
Example #2
0
 ///////////////////////////////////////////////////////////////////////////////////////////////
 private void Awake()
 {
     foreach (GameObject button in this.buttons)
     {
         OnTriggerEnterListener listener = button.AddComponent <OnTriggerEnterListener>();
         listener.onTriggerEnterDelegate = ButtonPressed;
     }
 }
    ///////////////////////////////////////////////////////////////////////////////////////////////
    private void Awake()
    {
        this.animator = this.GetComponent <Animator>();
        OnTriggerEnterListener listener = hitTrigger.AddComponent <OnTriggerEnterListener>();

        listener.onTriggerEnterDelegate = OnHit;
        //this.target = player.transform.position;
        this.rotYTransform = this.transform.Find("RotationY");

        this.bodyParts = this.gameObject.GetComponentsInChildren <Collider>();
    }
Example #4
0
 public void EnrollBulletEnter(OnTriggerEnterListener onTriggerEnter)
 {
     _onTriggerEnterListener += onTriggerEnter;
 }