Example #1
0
        // Use this for initialization
        void Start()
        {
            boatRB = gameObject.GetComponent <Rigidbody>();

            modifyBoatMesh = new ModifyBoatMesh(gameObject);

            underWaterMesh = underWaterObj.GetComponent <MeshFilter>().mesh;
        }
Example #2
0
        void Start()
        {
            //Init the script that will modify the boat mesh
            modifyBoatMesh = new ModifyBoatMesh(boatMeshObj, underWaterObj, aboveWaterObj, boatRB);

            //Meshes that are below and above the water
            underWaterMesh = underWaterObj.GetComponent <MeshFilter>().mesh;
            aboveWaterMesh = aboveWaterObj.GetComponent <MeshFilter>().mesh;
        }
Example #3
0
        void Start()
        {
            //Get the boat's rigidbody
            boatRB = gameObject.GetComponent <Rigidbody>();

            //Init the script that will modify the boat mesh
            modifyBoatMesh = new ModifyBoatMesh(gameObject);

            //Meshes that are below and above the water
            underWaterMesh = underWaterObj.GetComponent <MeshFilter>().mesh;
        }