public void Invoke(GEventData_BulletHitEnemy data) { foreach (Action <GEventData_BulletHitEnemy> callback in _callbacks) { callback(data); } }
public void OnBulletHitEnemy(GEventData_BulletHitEnemy eventData) { Debug.Log("hit rigid body: " + eventData.RigidBody); Time.timeScale = 0.3f; _enemy.Hit(eventData.HitDirection * eventData.Power, eventData.HitPosition, eventData.RigidBody); }