Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="body"></param>
        /// <param name="model"></param>
        /// <param name="collisionBehaviors"></param>
        public AbstractEntity(AbstractBody body, PrimitiveBuilder model, ICollisionBehaviors collisionBehaviors = null)
        {
            // Set body
            this.Body = body;

            // Set model
            this._model = model;

            // Subscribe to collision event
            CollisionPool.Instance.CollisionDetected += CollisionDetected;

            // Set collision behaviors
            this._collisionBehaviors = collisionBehaviors;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Set collision behaviors
 /// </summary>
 /// <param name="collisionBehaviors"></param>
 public void SetCollisionBehaviors(ICollisionBehaviors collisionBehaviors)
 {
     this._collisionBehaviors = collisionBehaviors;
 }