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; }
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); } }