Beispiel #1
0
 /// <summary>
 /// Check a raycast hit, and call appropriate event handlers
 /// </summary>
 /// <param name="scanbox"></param>
 /// <param name="dHealth"></param>
 /// <param name="hit"></param>
 /// <param name="OnHit"></param>
 private static void ApplyCastHit(Scanbox scanbox, HitscanType type, DeltaHealth dHealth, CEvent cEvent, RaycastHit hit, Action <Scanbox, RaycastHit> OnHit)
 {
     if (scanbox != null)
     {
         scanbox.AcceptScan(type, dHealth, cEvent);
     }
     OnHit?.Invoke(scanbox, hit);
 }
Beispiel #2
0
        void Awake()
        {
            Scanbox scanbox = gameObject.AddOrGetComponent <Scanbox>();

            scanbox.eventbox = this;
        }
Beispiel #3
0
        private void Awake()
        {
            Scanbox scanbox = gameObject.AddOrGetComponent <Scanbox>();

            scanbox.hurtbox = this;
        }