public void GetInput()
    {
        string input = iF.text;
        int    number;

        iF.text = "";
        if (Int32.TryParse(input, out number) && int.Parse(input) == 104)
        {
            //	Debug.Log (DateTime.Now + " " + DateTime.);
            Q1.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge1.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }


        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #2
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Eagle CAD" || input == "Eagle Cad" || input == "Eagle cad" || input == "eagle cad")
        {
            SQ3.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge6.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #3
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Random Number" || input == "Garbage" || input == "Unknown value" || input == "Random number" || input == "Unknown value" || input == "Unknown")
        {
            Code2.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge3.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #4
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "IC" || input == "Integrated circuit" || input == "Integrated Circuit" || input == "integrated circuit" || input == "Piste")
        {
            Ic.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge2.gameObject.SetActive(true);
            ID.gameObject.SetActive(false);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #5
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Big mac" || input == "Big Mac" || input == "big mac" || input == "big Mac" || input == "A big mac" || input == "A Big Mac")
        {
            RQ3.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge5.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        input   = input.ToLower();
        Answer  = Answer.ToLower();
        if (input == Answer || input == Answer)
        {
            Q2.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge1.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #7
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Power Supply" || input == "Power supply" || input == "power supply")
        {
            Ram.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge2.gameObject.SetActive(true);
            ID.gameObject.SetActive(false);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #8
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "CPEParty2017")
        {
            Code4.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge3.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #9
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        string input2 = input.ToLower();  //changes made\\

        if (input2 == "matlab")           //changes made
        {
            QnA4.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge5.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Beispiel #10
0
 public static void Update()
 {
     WhiteFlash.Update();
     RewindEffect.Update();
     BlackFade.Update();
     Heart.Update(GameWorld.GetPlayers()[0]);
     Coin.Update(GameWorld.GetPlayers()[0]);
 }
Beispiel #11
0
    public static BlackFade GetCamera()
    {
        BlackFade bf = Camera.main.GetComponent <BlackFade>();

        if (bf == null)
        {
            bf = Camera.main.gameObject.AddComponent <BlackFade>();
        }
        return(bf);
    }
Beispiel #12
0
    IEnumerator loadingStage()
    {
        BlackFade blackScreen = GameObject.Find("MenuCanvas").GetComponentInChildren <BlackFade>();

        while (blackScreen.fadingOut == true)
        {
            yield return(new WaitForSeconds(1));
        }

        canMove = true;
        canAct  = true;
    }
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
     }
     animator = GetComponent <Animator>();
     fadeTime = animator.GetCurrentAnimatorStateInfo(0).length;
 }
	public void StartGame (int index) {

        Serialization.lastTime = Time.realtimeSinceStartup;

        if (Tasks.levels.IndexOf(Tasks.currentLevel) != index) {
            Tasks.game = new Game(index.ToString());
            activeScene = levels[index].scene;
        } else if (isOffline)
            activeScene = levels[index].scene;

        if (!string.IsNullOrEmpty(activeScene))
            BlackFade.LoadScene(activeScene);
    }
Beispiel #15
0
 public static void Draw(SpriteBatch spriteBatch)
 {
     WhiteFlash.Draw(spriteBatch);
     RewindEffect.Draw(spriteBatch);
     ColoredCorners.Draw(spriteBatch);
     if (TMBAW_Game.CurrentGameMode == GameMode.Play && !StoryTracker.InCutscene)
     {
         Heart.Draw(spriteBatch);
         Coin.Draw(spriteBatch);
     }
     DarkBackground.Draw(spriteBatch);
     BlackFade.Draw(spriteBatch);
     BlackBars.Draw(spriteBatch);
 }
Beispiel #16
0
    // Update is called once per frame
    void Update()
    {
        Okay.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                Okay.gameObject.SetActive(false);
                BlackFade.gameObject.SetActive(true);
                Question.gameObject.SetActive(true);
                Canvas.gameObject.SetActive(false);
            }
        });

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Question.gameObject.SetActive(false);
            }
        });
    }
    public void Show (RectTransform target) {

        if (target == levelsGrid && toSelect)
            SceneManager.LoadScene(SceneManager.GetActiveScene().name);

        if (!pages.Contains(target))
            pages.Add(target);
        else
            return;

        // Go to Character Creation if this is the first load
        if (target == levelsGrid) {
            SaveData sd = SaveData.ReadGameSave();
            if (sd == null || (sd != null && sd.character == null)) {
                BlackFade.LoadScene("CharacterCreation");
                return;
            }
        }

        target.gameObject.SetActive(true);
        main.gameObject.SetActive(false);
    }
        public void SaveAll()
        {
            string toScene = MainMenu.activeScene;

            // Return to Main Menu if this is the first load
            SaveData sd = SaveData.ReadGameSave();

            if (sd == null || (sd != null && sd.character == null))
            {
                toScene           = "MainMenu";
                MainMenu.toSelect = true;
            }

            SaveData.WriteCharacterSave();
            #if UNITY_EDITOR
            if (string.IsNullOrEmpty(toScene))
            {
                toScene = "MainMenu";
                Debug.LogWarning("Character Customization scene should not be entered directly from editor - this will cause errors.");
            }
            #endif
            BlackFade.LoadScene(toScene);
            //FindObjectOfType<SwitchScene>().ChangeScene(toScene);
        }
Beispiel #19
0
    IEnumerator FadeProcess(float time)
    {
        BlackFade   bf          = GetCamera();
        EventSystem eventSystem = EventSystem.current;

        Canvas[]     canvases = new Canvas[0];
        RenderMode[] modes    = new RenderMode[0];
        if (newScene)
        {
            if (eventSystem != null)
            {
                eventSystem.enabled = false;
            }
            canvases = GameObject.FindObjectsOfType <Canvas>();
            for (int i = 0; i < canvases.Length; i++)
            {
                canvases[i].renderMode  = RenderMode.ScreenSpaceCamera;
                canvases[i].worldCamera = Camera.main;
            }
        }
        while (bf.intensity < 1f)
        {
            yield return(null);

            bf.intensity += Time.deltaTime / time;
        }
        bf.intensity = 1.0f;
        foreach (Action item in fadeActions)
        {
            item.Invoke();
        }
        hasRun = true;
        if (newScene)
        {
            yield return(null);

            hasReset = true;
            if (eventSystem == null)
            {
                eventSystem = EventSystem.current;
            }
            if (eventSystem != null)
            {
                eventSystem.enabled = false;
            }
            bf           = GetCamera();
            bf.intensity = 1.0f;
            canvases     = GameObject.FindObjectsOfType <Canvas>();
            modes        = new RenderMode[canvases.Length];
            for (int i = 0; i < canvases.Length; i++)
            {
                modes[i] = canvases[i].renderMode;
                canvases[i].renderMode  = RenderMode.ScreenSpaceCamera;
                canvases[i].worldCamera = Camera.main;
            }
        }
        while (bf.intensity > 0f)
        {
            yield return(null);

            bf.intensity -= Time.deltaTime / time;
        }
        bf.intensity = 0f;
        if (newScene)
        {
            if (eventSystem != null)
            {
                eventSystem.enabled = true;
            }
            for (int i = 0; i < canvases.Length; i++)
            {
                canvases[i].renderMode = modes[i];
            }
        }
        Destroy(gameObject);
    }
Beispiel #20
0
 public static void FadeToBlack()
 {
     BlackFade.FadeOut();
 }
Beispiel #21
0
        // Update is called once per frame
        void Update()
        {
            Okay.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(true);
                    Confirm.gameObject.SetActive(true);
                    Yes.gameObject.SetActive(true);
                    No.gameObject.SetActive(true);
                }
            });

            Yes.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(true);
                    Success.gameObject.SetActive(true);
                    Confirm.gameObject.SetActive(false);
                    Yes.gameObject.SetActive(false);
                    No.gameObject.SetActive(false);

                    B1.gameObject.SetActive(false);
                    B2.gameObject.SetActive(false);
                    B3.gameObject.SetActive(false);
                    B4.gameObject.SetActive(false);
                    B5.gameObject.SetActive(false);
                    B6.gameObject.SetActive(false);
                    I1.gameObject.SetActive(false);
                    I2.gameObject.SetActive(false);
                    I3.gameObject.SetActive(false);
                    S1.gameObject.SetActive(false);
                    S2.gameObject.SetActive(false);
                    S3.gameObject.SetActive(false);

                    PlayerPrefs.DeleteKey("Badge1");
                    PlayerPrefs.DeleteKey("Badge2");
                    PlayerPrefs.DeleteKey("Badge3");
                    PlayerPrefs.DeleteKey("Badge4");
                    PlayerPrefs.DeleteKey("Badge5");
                    PlayerPrefs.DeleteKey("Badge6");

                    PlayerPrefs.DeleteKey("ID1");
                    PlayerPrefs.DeleteKey("ID2");
                    PlayerPrefs.DeleteKey("ID3");

                    PlayerPrefs.DeleteKey("Secret1");
                    PlayerPrefs.DeleteKey("Secret2");
                    PlayerPrefs.DeleteKey("Secret3");
                }
            });

            No.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                    Confirm.gameObject.SetActive(false);
                    Yes.gameObject.SetActive(false);
                    No.gameObject.SetActive(false);
                }
            });

            BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                    Success.gameObject.SetActive(false);
                }
            });
        }
 // Start is called before the first frame update
 void Start()
 {
     blackFade = FindObjectOfType <BlackFade>();
     mCam      = FindObjectOfType <OldCameraFollow>().transform;
 }
Beispiel #23
0
 public static void FadeIn()
 {
     BlackFade.FadeIn();
 }
Beispiel #24
0
 private void Awake()
 {
     instance    = this;
     fadeOutDone = false;
 }
 void Awake()
 {
     loadingScreen = transform.GetChild(0).gameObject;
     blackFade     = GetComponentInChildren <BlackFade>();
     DontDestroyOnLoad(this);
 }
Beispiel #26
0
 public void Exit()
 {
     SaveData.WriteGameSave();
     //UnityEngine.SceneManagement.SceneManager.LoadScene("MainMenu");
     BlackFade.LoadScene("MainMenu");
 }
Beispiel #27
0
 public void OnClick()
 {
     SaveData.WriteGameSave();
     //UnityEngine.SceneManagement.SceneManager.LoadScene("CharacterCreation");
     BlackFade.LoadScene("CharacterCreation");
 }
 void Awake()
 {
     m_fadeType = FadeEnum.FE_DONE;
     m_fadeAction = new BlackFade();
 }
Beispiel #29
0
 void Awake()
 {
     Time.timeScale = 1;     // Cuz we gods we gotta remember dat time yo
             blackFade = GetComponent<BlackFade>();
             images = Resources.LoadAll(imagesFolder, typeof(Texture2D));
 }