Exemplo n.º 1
0
    private float CreatePatch(int patchIndex)
    {
        EnvironmentPatch patch = LoadPatchClone(m_LastEndPoint.position.ResetHeight(), patchIndex);

        m_LastEndPoint     = patch.m_PatchEnd;
        m_PatchViewsAngle += patch.m_PatchAngle;

        return(patch.m_PatchLength);
    }
Exemplo n.º 2
0
    private EnvironmentPatch LoadPatchClone(Vector3 position, int patchIndex)
    {
        EnvironmentPatch patch = Instantiate(m_Patches[patchIndex], m_PatchesContainer);

        patch.gameObject.SetActive(true);
        patch.transform.position = position;
        Vector3 patchAngles = patch.transform.localEulerAngles;

        patchAngles.y = m_PatchViewsAngle;
        patch.transform.localEulerAngles = patchAngles;
        return(patch);
    }