Example #1
0
 private void OnRenderObject()
 {
     if (scaling != 1f)
     {
         transform.localScale    = scaleRef * scaling;
         transform.localPosition = CalculatePos();
     }
     else if (transform.localPosition != posRef || transform.localScale != scaleRef)
     {
         transform.localScale    = scaleRef;
         transform.localPosition = posRef;
     }
     StaticObjects.shieldObj().transform.rotation = transform.rotation;
 }
Example #2
0
        private Vector3 getForward()
        {
            switch (_name)
            {
            case "ShieldWood":
            case "ShieldBanded":
                return(StaticObjects.shieldObj().transform.forward);

            case "ShieldKnight":
                return(-StaticObjects.shieldObj().transform.right);

            case "ShieldBronzeBuckler":
                return(-StaticObjects.shieldObj().transform.up);

            default:
                return(-StaticObjects.shieldObj().transform.forward);
            }
        }