Esempio n. 1
0
    private void OnHit(GameObject hitObject, Vector3 hitPoint)
    {
        print("hit: " + hitObject);
        Character character = hitObject.GetComponent <Character>();
        Objects   anObject  = hitObject.GetComponent <Objects>();

        //RpcTarget rpcobject = hitObject.GetComponent<Objects>();

        if (character)
        {
            character.ChangeSize(growMode ? 1.5f : 0.5f);
        }
        if (anObject)
        {
            anObject.ChangeSize(growMode ? 1.5f: 0.5f);
        }
    }