Ejemplo n.º 1
0
 void Start()
 {
     FlikittCore   = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
     UserInterface = GameObject.Find("User Interface").GetComponent <UserInterface>();
     colorName     = "White";
     width         = 0.07f;
 }
Ejemplo n.º 2
0
    //Loading an existing project
    public Project(string _name, string _type, List <Frame> _frames, List <AudioClip> _audio, float _fps)
    {
        dm   = GameObject.Find("Drawing Manager").GetComponent <DrawingManager>();
        fc   = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
        name = _name;

        type     = _type;
        frames   = _frames;
        allAudio = _audio;
        fps      = _fps;
    }
Ejemplo n.º 3
0
 //Constructing a new project
 public Project(string _name, string _type, GameObject _linePrefab)
 {
     dm         = GameObject.Find("Drawing Manager").GetComponent <DrawingManager>();
     fc         = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
     name       = _name;
     type       = _type;
     linePrefab = _linePrefab;
     frames     = new List <Frame>();
     allAudio   = new List <AudioClip>();
     fps        = 7.5f;
 }
Ejemplo n.º 4
0
    void Start()
    {
        FlikittCore    = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
        DrawingManager = GameObject.Find("Drawing Manager").GetComponent <DrawingManager>();
        UserInterface  = GameObject.Find("User Interface").GetComponent <UserInterface>();

        if (!ES3.KeyExists("Existing Projects"))
        {
            existingProjects = new List <string>();
            ES3.Save <List <string> >("Existing Projects", existingProjects);
        }
        else
        {
            existingProjects = ES3.Load <List <string> >("Existing Projects");
        }
    }
Ejemplo n.º 5
0
    void Start()
    {
        FlikittCore = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
        //CameraManager = GameObject.Find("Camera Manager").GetComponent<CameraManager>();
        MicrophoneManager = GameObject.Find("Microphone Manager").GetComponent <MicrophoneManager>();
        DrawingManager    = GameObject.Find("Drawing Manager").GetComponent <DrawingManager>();
        SaveLoad          = GameObject.Find("Easy Save 3 Manager").GetComponent <SaveLoad>();
        ShareManager      = GameObject.Find("Share Manager").GetComponent <ShareManager>();


        fpsSlider.maxValue = 60.0f; fpsSlider.minValue = 0.5f;

        string[] colors = new string[9] {
            "Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Purple", "White", "Black"
        };
        for (int i = 0; i < colors.Length; i++)
        {
            Image       swatchImage = GameObject.Find(colors[i] + "_Swatch").GetComponent <Image>();
            ColorSwatch colorSwatch = new ColorSwatch(colors[i], swatchImage);
            colorSwatches.Add((new ColorSwatch(colors[i], swatchImage)));
        }
        DisableAllSwatches();
        EnableSwatch("White");

        SetMode("Capture");

        copyLength1.color = new Color(copyLength1.color.r, copyLength1.color.g, copyLength1.color.b, 1.0f);
        fadeIn.color      = new Color(fadeIn.color.r, fadeIn.color.g, fadeIn.color.b, 1.0f);

        foreach (var obj in Resources.FindObjectsOfTypeAll <Transform>() as Transform[])
        {
            if (obj.gameObject.name == "Saving Dock" || obj.gameObject.name == "Save Text")
            {
                obj.gameObject.SetActive(false);
            }
        }
    }
Ejemplo n.º 6
0
    void Start()
    {
        FlikittCore = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();

        //Android Permissions, and grabbing the phone microphone
                #if PLATFORM_ANDROID
        if (!Permission.HasUserAuthorizedPermission(Permission.Microphone))
        {
            Permission.RequestUserPermission(Permission.Microphone);
        }

        if (Microphone.devices != null)
        {
            microphone = Microphone.devices[0];
        }
        currentTrack = 1;
        hasRecording = false;
        StartLoadMakeAudio();
                #else
        currentTrack = 1;
        hasRecording = false;
        StartLoadMakeAudio();
                #endif
    }
Ejemplo n.º 7
0
 void Start()
 {
     fc = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
     mm = GameObject.Find("Microphone Manager").GetComponent <MicrophoneManager>();
 }
Ejemplo n.º 8
0
 void Awake()
 {
     dm = GameObject.Find("Drawing Manager").GetComponent <DrawingManager>();
     fc = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
 }
Ejemplo n.º 9
0
    void Start()
    {
        FlikittCore = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();

        //Android Permissions
                #if PLATFORM_ANDROID
        if (!Permission.HasUserAuthorizedPermission(Permission.Camera))
        {
            do
            {
                Permission.RequestUserPermission(Permission.Camera);
            } while (!Permission.HasUserAuthorizedPermission(Permission.Camera));
        }

        if (WebCamTexture.devices != null)
        {
            camName = WebCamTexture.devices[0].name;
            webTex  = new WebCamTexture(camName, Screen.width, Screen.height);

            camRender.texture = webTex;
            camRender.material.mainTexture = webTex;
            camRender.rectTransform.SetTop((int)((Screen.height - Screen.width) / 2));
            camRender.rectTransform.SetBottom((int)((Screen.height - Screen.width) / 2));
            camRender.rectTransform.SetLeft((int)((Screen.width - Screen.height) / 2));
            camRender.rectTransform.SetRight((int)((Screen.width - Screen.height) / 2));


            //For back facing camera.
            camRender.rectTransform.localEulerAngles = new Vector3(0, 0, -90);
            //For Front Facing Camera.
            //camRender.rectTransform.localEulerAngles = new Vector3(0,180,-270);

            if (webTex != null)
            {
                webTex.Play();
            }
        }
                #else
        //ANDROID ENDS HERE

        if (!(Application.HasUserAuthorization(UserAuthorization.WebCam)))
        {
            do
            {
                Application.RequestUserAuthorization(UserAuthorization.WebCam);
            } while (!(Application.HasUserAuthorization(UserAuthorization.WebCam)));
        }

        if (WebCamTexture.devices != null)
        {
            camName = WebCamTexture.devices[0].name;
            webTex  = new WebCamTexture(camName, Screen.width, Screen.height);

            camRender.texture = webTex;
            camRender.material.mainTexture = webTex;
            camRender.rectTransform.SetTop((int)((Screen.height - Screen.width) / 2));
            camRender.rectTransform.SetBottom((int)((Screen.height - Screen.width) / 2));
            camRender.rectTransform.SetLeft((int)((Screen.width - Screen.height) / 2));
            camRender.rectTransform.SetRight((int)((Screen.width - Screen.height) / 2));


            //For back facing camera.
            camRender.rectTransform.localEulerAngles = new Vector3(0, 0, -90);
            //For Front Facing Camera.
            //camRender.rectTransform.localEulerAngles = new Vector3(0,180,-270);

            if (webTex != null)
            {
                webTex.Play();
            }
        }
                #endif
    }
Ejemplo n.º 10
0
 void Start()
 {
     FlikittCore   = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
     toggle.sprite = off;
 }
Ejemplo n.º 11
0
 void Start()
 {
     ui = GameObject.Find("User Interface").GetComponent <UserInterface>();
     fc = GameObject.Find("Flikitt Core").GetComponent <FlikittCore>();
 }