/// <summary> /// Called when the Game Object start colliding with another object. /// </summary> /// <param name="other">The other object we collide with.</param> /// <param name="data">Extra collision data.</param> public void CallCollisionStart(GameObject other, Core.Physics.CollisionData data) { foreach (var component in new List <Components.BaseComponent>(_components)) { component.CollisionStart(other, data); } }
/// <summary> /// Called when this physical body start colliding with another body. /// </summary> /// <param name="other">The other body we collide with.</param> /// <param name="data">Extra collision data.</param> public void CallCollisionStart(BasePhysicsComponent other, Core.Physics.CollisionData data) { if (_GameObject != null && other._GameObject != null) { _GameObject.CallCollisionStart(other._GameObject, data); } }
/// <summary> /// Called when the parent Game Object start colliding with another object. /// </summary> /// <param name="other">The other object we collide with.</param> /// <param name="data">Extra collision data.</param> protected abstract void OnCollisionStart(GameObject other, Core.Physics.CollisionData data);
/// <summary> /// Called when the parent Game Object start colliding with another object. /// </summary> /// <param name="other">The other object we collide with.</param> /// <param name="data">Extra collision data.</param> protected override void OnCollisionStart(GameObject other, Core.Physics.CollisionData data) { }
/// <summary> /// Called when this physical body start colliding with another body. /// </summary> /// <param name="other">The other body we collide with.</param> /// <param name="data">Extra collision data.</param> public void CollisionStart(GameObject other, Core.Physics.CollisionData data) { OnCollisionStart(other, data); }