예제 #1
0
    public void DoneDisplaying()
    {
        if (!doneDisplaying && minimumDisplayTimeMet)
        {
            doneDisplaying = true;

            if (deactivateSelfOnDismiss)
            {
                this.gameObject.SetActive(false);
            }

            if (lastPanel)
            {
                //let globals know to start
                Globals.Instance.IntroFinished();
                if (deactivateParentOnDismiss)
                {
                    introParent.SetActive(false);
                }
            }
            else
            {
                nextPanel.DisplayPanel();
            }
        }
    }
예제 #2
0
    public override void Start()
    {
        base.Start();

        if (this == null)
        {
            return;
        }

        if (playIntro && firstPanel != null)
        {
            //play intro
            acceptPlayerGameInput = false;
            //GUIManager.Instance.FadeScreen(1.0f, 1.0f, 0.0f);
            firstPanel.introParent.SetActive(true);
            firstPanel.DisplayPanel();
        }
        else
        {
            StartGame();
        }
    }
예제 #3
0
    //[MenuItem("Edit/Reset Playerprefs")]
    //public static void DeletePlayerPrefs() { PlayerPrefs.DeleteAll(); }

    public override void Start()
    {
        if (deletePlayerPrefs)
        {
            PlayerPrefs.DeleteAll();
        }
        base.Start();

        if (this == null)
        {
            return;
        }

        if (playIntro && firstPanel != null)
        {
            //play intro
            acceptPlayerGameInput = false;
            //GUIManager.Instance.FadeScreen(1.0f, 1.0f, 0.0f);
            firstPanel.introParent.SetActive(true);
            firstPanel.DisplayPanel();
        }
        else
        {
            StartGame();
        }

        Vector2 point1 = new Vector2(-5, 5);
        Vector2 point2 = new Vector2(5, -5);

        //float angle1 = Vector2.Angle(Vector2.right, (point2 - point1));
        //float angle2 = Vector2.Angle(Vector2.right, (point1 - point2));
        //Vector2 v1 = point2 - point1;
        //Vector2 v2 = point1 - point2;

        //float angle1 = Mathf.Atan2(v1.y, v1.x) * Mathf.Rad2Deg;
        //float angle2 = Mathf.Atan2(v2.y, v2.x) * Mathf.Rad2Deg;
    }