Exemplo n.º 1
0
    public void PutOnObject(BaseVis vis)
    {
        posTmp.x = vis.transformObj.position.x;
        posTmp.y = vis.transformObj.position.y + vis.colliderObj.bounds.extents.y + sprite.bounds.size.y / 2;  // sprite bounds instead of collider, cos collider is turned off => bounds = 0
        posTmp.z = transformObj.position.z;
        transformObj.position = posTmp;

        // Debug.Log("vis.colliderObj.bounds.extents " + vis.colliderObj.bounds.extents.y);
        // Debug.Log("colliderObj.bounds.extents.y " + colliderObj.bounds.extents.y);
        // Debug.Log("sprite.size.y " + sprite.bounds.size.y);
    }
Exemplo n.º 2
0
 public void RestOnObject(BaseVis vis)
 {
     SetParamsToDefault();
     PutOnObject(vis);
 }