Exemplo n.º 1
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this);
        }

        if (PlayerPrefs.HasKey("InputToggle"))
        {
            InputToggle.isOn    = bool.Parse(PlayerPrefs.GetString("InputToggle"));
            AutoPlayToggle.isOn = bool.Parse(PlayerPrefs.GetString("AutoPlayToggle"));
            LockToggle.isOn     = bool.Parse(PlayerPrefs.GetString("LockToggle"));
            levelNumber         = PlayerPrefs.GetInt("LevelNumber");
        }

        Leveldistance = Mathf.Abs(FinishLine.transform.position.x - Tool.transform.position.x);


        Application.targetFrameRate = 61;

        toolController = Tool.GetComponent <ToolObjectController>();

        GameLevelText.text = ("Level " + (levelNumber + 1));
    }
Exemplo n.º 2
0
    void PerfectTrigger(Collider other)
    {
        ToolObjectController toolController = gm.Tool.GetComponent <ToolObjectController>();

        if (toolController.isShrinked)
        {
            NormalPassTrigger(other);
        }
        else
        {
            Color MyColor = GetComponentInParent <MeshRenderer>().material.color;
            MyColor = new Color(MyColor.r, MyColor.g, MyColor.b, MyColor.a / 2f);
            other.GetComponent <Frame>().PerfectAnim(MyColor);
            gm.PerfectAnimTrigger();
            PlayerController.Instance.speed *= 1.075f;
        }
    }