Example #1
0
 void Awake()
 {
     if (sprayCam == null)
     {
         sprayCam = FindObjectOfType <SprayCam>();
     }
 }
    void Awake()
    {
        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }

        meshRenderer = GetComponent <MeshRenderer>();
    }
Example #3
0
    // Use this for initialization
    void Awake()
    {
        if (viewManager == null)
        {
            viewManager = FindObjectOfType <ViewManager>();
        }

        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }
    }
Example #4
0
    void Awake()
    {
        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }

        if (image == null)
        {
            image = GetComponent <RawImage>();
        }

        textureMap[BrushSize.Big]    = bigBrush;
        textureMap[BrushSize.Medium] = medBrush;
        textureMap[BrushSize.Small]  = smallBrush;
    }
        // Use this for initialization
        void Awake()
        {
            CardboardHead cardboardHead = FindObjectOfType <CardboardHead>();

            if (cardboardHead != null)
            {
                head = cardboardHead.transform;
            }

            if (sprayCam == null)
            {
                sprayCam = FindObjectOfType <SprayCam>();
            }

            InstanceMaterials();
            DisableAll();
            if (sprayCam == null || sprayCam.ShouldShowOnBoarding)
            {
                StartOnBoarding();
            }
        }
    void Awake()
    {
        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }

        if (image == null)
        {
            image = GetComponent <RawImage>();
        }

        if (flipTransform == null)
        {
            flipTransform = GetComponent <RectTransform>();
        }

        textureMap[CameraFacing.Front]      = frontFacing;
        textureMap[CameraFacing.Back]       = backFacing;
        textureMapLarge[CameraFacing.Front] = frontFacingLarge;
        textureMapLarge[CameraFacing.Back]  = backFacingLarge;
    }
Example #7
0
    void Awake()
    {
        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }

        if (image == null)
        {
            image = GetComponent <RawImage>();
        }
        if (isFadeEnabled)
        {
            image.color = new Color(1f, 1f, 1f, 0);
        }
        else
        {
            image.color = new Color(1f, 1f, 1f, 1f);
        }

        textureMap[BrushSize.Big]    = largeBrushPreview;
        textureMap[BrushSize.Medium] = mediumBrushPreview;
        textureMap[BrushSize.Small]  = smallBrushPreview;
    }
Example #8
0
    void Awake()
    {
        if (sprayCam == null)
        {
            sprayCam = FindObjectOfType <SprayCam>();
        }

        if (editViewObject == null)
        {
            throw new MissingReferenceException("Edit view reference is missing on: " + this);
        }

        if (listViewObject == null)
        {
            throw new MissingReferenceException("List view reference is missing on: " + this);
        }

        if (viewViewObject == null)
        {
            throw new MissingReferenceException("View view reference is missing on: " + this);
        }

        if (savingViewObject == null)
        {
            throw new MissingReferenceException("Saving view reference is missing on: " + this);
        }

        if (deleteViewObject == null)
        {
            throw new MissingReferenceException("Delete view reference is missing on: " + this);
        }

        if (clearViewObject == null)
        {
            throw new MissingReferenceException("Clear view reference is missing on: " + this);
        }

        if (saveCompleteViewObject == null)
        {
            throw new MissingReferenceException("Save Complete view reference is missing on: " + this);
        }

        if (timeToTidayViewObject == null)
        {
            throw new MissingReferenceException("Time to Tidy view reference is missing on: " + this);
        }

        if (googleViewObject == null)
        {
            throw new MissingReferenceException("Google view reference is missing on: " + this);
        }

        if (shareChoiceObject == null)
        {
            throw new MissingReferenceException("Share Choice view reference is missing on: " + this);
        }

        if (uploadingViewObject == null)
        {
            throw new MissingReferenceException("Uploading view reference is missing on: " + this);
        }

        // this is getting stupid....
        if (uploadFailedObject == null)
        {
            throw new MissingReferenceException("Upload Failed view reference is missing on: " + this);
        }

        if (authConfirmObject == null)
        {
            throw new MissingReferenceException("Auth Confirm view reference is missing on: " + this);
        }

        if (accountProhibitedObject == null)
        {
            throw new MissingReferenceException("Account Prohibited view reference is missing on: " + this);
        }

        if (aboutViewObject == null)
        {
            throw new MissingReferenceException("About wiew reference is missing on: " + this);
        }

        if (facebookShareBackgroundObject == null)
        {
            throw new MissingReferenceException("Share Background view reference is missing on: " + this);
        }

        if (blankShareBackgroundObject == null)
        {
            throw new MissingReferenceException("Blank Background view reference is missing on: " + this);
        }

        if (contactsPermissionErrorObject == null)
        {
            throw new MissingReferenceException("Contacts Error view reference is missing on: " + this);
        }

        if (noGyroObject == null)
        {
            throw new MissingReferenceException("No gyro view reference is missing on: " + this);
        }

        if (badConnectionObject == null)
        {
            throw new MissingReferenceException("Bad Connection view reference is missing on: " + this);
        }

        if (driveAuthFailedObject == null)
        {
            throw new MissingReferenceException("Drive Auth Failed view reference is missing on: " + this);
        }


        editView = editViewObject.GetComponent <IAnimatedView>();
        if (editView == null)
        {
            throw new MissingComponentException("Edit view object is missing a component that implements IAnimatedView on: " + this);
        }

        listView = listViewObject.GetComponent <IAnimatedView>();
        if (listView == null)
        {
            throw new MissingComponentException("List view object is missing a component that implements IAnimatedView on: " + this);
        }

        viewView = viewViewObject.GetComponent <IAnimatedView>();
        if (viewView == null)
        {
            throw new MissingComponentException("View view object is missing a component that implements IAnimatedView on: " + this);
        }

        savingView = savingViewObject.GetComponent <IAnimatedView>();
        if (savingView == null)
        {
            throw new MissingComponentException("Saving view object is missing a component that implements IAnimatedView on: " + this);
        }

        deleteView = deleteViewObject.GetComponent <IAnimatedView>();
        if (deleteView == null)
        {
            throw new MissingComponentException("Delete view object is missing a component that implements IAnimatedView on: " + this);
        }

        clearView = clearViewObject.GetComponent <IAnimatedView>();
        if (clearView == null)
        {
            throw new MissingComponentException("Clear view object is missing a component that implements IAnimatedView on: " + this);
        }

        saveCompleteView = saveCompleteViewObject.GetComponent <IAnimatedView>();
        if (saveCompleteView == null)
        {
            throw new MissingComponentException("Save Complete view object is missing a component that implements IAnimatedView on: " + this);
        }

        googleView = googleViewObject.GetComponent <IAnimatedView>();
        if (googleView == null)
        {
            throw new MissingComponentException("Google view object is missing a component that implements IAnimatedView on: " + this);
        }

        shareChoiceView = shareChoiceObject.GetComponent <IAnimatedView>();
        if (shareChoiceView == null)
        {
            throw new MissingComponentException("Share Choice view object is missing a component that implements IAnimatedView on: " + this);
        }

        shareLinkChoiceView = shareLinkChoiceObject.GetComponent <IAnimatedView>();
        if (shareLinkChoiceView == null)
        {
            throw new MissingComponentException("Share Link Choice view object is missing a component that implements IAnimatedView on: " + this);
        }

        timeToTidayView = timeToTidayViewObject.GetComponent <IAnimatedView>();
        if (timeToTidayView == null)
        {
            throw new MissingComponentException("Time to Tidy view object is missing a component that implements IAnimatedView on: " + this);
        }

        uploadingView = uploadingViewObject.GetComponent <IAnimatedView>();
        if (uploadingView == null)
        {
            throw new MissingComponentException("Uploading view object is missing a component that implements IAnimatedView on: " + this);
        }

        uploadFailedView = uploadFailedObject.GetComponent <IAnimatedView>();
        if (uploadFailedView == null)
        {
            throw new MissingComponentException("Upload Failed view object is missing a component that implements IAnimatedView on: " + this);
        }

        authConfirmView = authConfirmObject.GetComponent <IAnimatedView>();
        if (authConfirmView == null)
        {
            throw new MissingComponentException("Auth Confirm view object is missing a component that implements IAnimatedView on: " + this);
        }

        aboutView = aboutViewObject.GetComponent <IAnimatedView>();
        if (aboutView == null)
        {
            throw new MissingComponentException("About view object is missing a component that implements IAnimatedView on: " + this);
        }

        accountProhibitedView = accountProhibitedObject.GetComponent <IAnimatedView>();
        if (accountProhibitedView == null)
        {
            throw new MissingComponentException("Account Prohibited view object is missing a component that implements IAnimatedView on: " + this);
        }

        facebookShareBackgroundView = facebookShareBackgroundObject.GetComponent <IAnimatedView>();
        if (facebookShareBackgroundView == null)
        {
            throw new MissingComponentException("Facebook Share Background view object is missing a component that implements IAnimatedView on: " + this);
        }

        blankShareBackgroundView = blankShareBackgroundObject.GetComponent <IAnimatedView>();
        if (blankShareBackgroundView == null)
        {
            throw new MissingComponentException("Blank Share Background view object is missing a component that implements IAnimatedView on: " + this);
        }

        contactsPermissionErrorView = contactsPermissionErrorObject.GetComponent <IAnimatedView>();
        if (contactsPermissionErrorView == null)
        {
            throw new MissingComponentException("Contacts Permission Error view object is missing a component that implements IAnimatedView on: " + this);
        }

        noGyroView = noGyroObject.GetComponent <IAnimatedView>();
        if (noGyroView == null)
        {
            throw new MissingComponentException("No Gyro view object is missing a component that implements IAnimatedView on: " + this);
        }

        badConnectionView = badConnectionObject.GetComponent <IAnimatedView>();
        if (badConnectionView == null)
        {
            throw new MissingComponentException("No Gyro view object is missing a component that implements IAnimatedView on: " + this);
        }

        driveAuthFailedView = driveAuthFailedObject.GetComponent <IAnimatedView>();
        if (driveAuthFailedView == null)
        {
            throw new MissingComponentException("Drive Auth Failed view object is missing a component that implements IAnimatedView on: " + this);
        }

        views = new IAnimatedView[] { editView, listView, viewView, savingView, deleteView, clearView, saveCompleteView, shareLinkChoiceView, timeToTidayView, googleView, shareChoiceView, uploadingView, uploadFailedView, authConfirmView, aboutView, accountProhibitedView, facebookShareBackgroundView, blankShareBackgroundView, contactsPermissionErrorView, noGyroView, badConnectionView, driveAuthFailedView };

        defaultView = editView;

        if (libaryController == null)
        {
            libaryController = FindObjectOfType <LibraryController>();
        }
    }