Exemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////////

        #region Collider

        protected override bool HandleCollision(MovableCell other)
        {
            Debug.Assert(isActive);

            if (other.IsPlayer())
            {
                return(other.AsPlayer().HandleCollision(this));
            }

            if (other.IsBomb())
            {
                return(HandleCollision(other.AsBomb()));
            }

            if (other.IsObstacle())
            {
                return(HandleObstacleCollistion(other));
            }

            return(false);
        }
Exemplo n.º 2
0
        protected override bool HandleCollision(MovableCell other)
        {
            Debug.Assert(isActive);

            if (other.IsPlayer())
            {
                return other.AsPlayer().HandleCollision(this);
            }

            if (other.IsBomb())
            {
                return HandleCollision(other.AsBomb());
            }

            if (other.IsObstacle())
            {
                return HandleObstacleCollistion(other);
            }

            return false;
        }
        protected override bool HandleCollision(MovableCell other)
        {
            if (other.IsBomb())
            {
                return HandleCollision(other.AsBomb());
            }

            if (other.IsPlayer())
            {
                return HandleCollision(other.AsPlayer());
            }

            return false;
        }