Ejemplo n.º 1
0
        public override Component CreateCollider(Vector3 position, TileInstance tile)
        {
            var collider = pool.RequestComponent();

            collider.center         = position;
            collider.size           = config.size3D;
            collider.isTrigger      = config.isTrigger;
            collider.sharedMaterial = config.material3D;
            return(collider);
        }
Ejemplo n.º 2
0
        public override Component CreateCollider(Vector3 position, TileInstance tile)
        {
            var collider = pool.RequestComponent();

            collider.offset         = position;
            collider.radius         = config.radius;
            collider.isTrigger      = config.isTrigger;
            collider.sharedMaterial = config.material2D;
            return(collider);
        }
Ejemplo n.º 3
0
        public override Component CreateCollider(Vector3 position, TileInstance tile)
        {
            var collider = pool.RequestComponent();

            collider.isTrigger      = config.isTrigger;
            collider.sharedMaterial = config.material3D;
            if (tile.hasSprite)
            {
                UpdateBoxShape(collider, position, tile.sprite.bounds);
            }
            return(collider);
        }
Ejemplo n.º 4
0
        public override Component CreateCollider(Vector3 position, TileInstance tile)
        {
            var collider = pool.RequestComponent();

            collider.offset         = position;
            collider.isTrigger      = config.isTrigger;
            collider.sharedMaterial = config.material2D;
            if (tile.hasSprite)
            {
                UpdatePolygonColliderShape(collider, tile.sprite);
            }
            return(collider);
        }