/// <summary> /// Triggered when a target is hit /// </summary> /// <param name="source">The EventInfoList to send</param> /// <param name="source"> /// The target struct used to cache this target when sent /// </param> public void OnHit(EventInfoList eventInfoList, Target target) { #if UNITY_EDITOR // Normal level debug and above if (this.debugLevel > DEBUG_LEVELS.Off) { Debug.Log ( string.Format ( "Targetable ({0}): EventInfoList[{1}]", this.name, eventInfoList.ToString() ) ); } #endif // Set the hitTime for all eventInfos in the list. eventInfoList = eventInfoList.CopyWithHitTime(); if (this.onHitDelegates != null) { this.onHitDelegates(eventInfoList, target); } }