コード例 #1
0
    void OnGUI()
    {
        GUI.matrix = GlobalGameStateManager.PrepareMatrix();

        Rect labelRect = new Rect(boxRect);

        labelRect.width  = boxRect.width;
        labelRect.height = (boxRect.height - 70) / 11;
        labelRect.x      = boxRect.x + 70;

        // prepare the style for the boxes
        boxStyle.font      = guiFont;
        boxStyle.fontSize  = 45;
        boxStyle.wordWrap  = true;
        boxStyle.alignment = TextAnchor.MiddleLeft;
        GUI.DrawTexture(boxRect, boxImage, ScaleMode.StretchToFill);
        labelRect.y = boxRect.y + 10;
        GUI.Label(labelRect, "#  Name        Score", boxStyle);

        for (int i = 0; i < GlobalGameStateManager.highscores.Length; i++)
        {
            if (GlobalGameStateManager.playerNames[i] != null)
            {
                labelRect.y = boxRect.y + 10 + labelRect.height * (i + 1);
                GUI.Label(labelRect, (i + 1).ToString() + ": " + GlobalGameStateManager.playerNames[i] + " ... " + GlobalGameStateManager.highscores[i].ToString(), boxStyle);
            }
        }

        GUI.matrix = Matrix4x4.identity;
    }
コード例 #2
0
 void Awake()
 {
     GameState = FindObjectOfType <GlobalGameStateManager>();
     textList  = new string[] { };
     InitTypewriter(false);
     Script = FindObjectOfType <ScriptData>();
 }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     GameState        = FindObjectOfType <GlobalGameStateManager>();
     NpcWriter        = FindObjectOfType <TypeWriter>();
     ChoiceWriter     = FindObjectOfType <ChoiceWriter>();
     targetHp         = hp;
     currentScriptKey = BossIndex;
 }
コード例 #4
0
    private void Start()
    {
        FindObjectOfType <OverworldTypewriter>().SetText("start");
        GameState       = FindObjectOfType <GlobalGameStateManager>();
        rb              = GetComponent <Rigidbody2D>();
        anim            = GetComponent <Animator>();
        facingDirection = Direction.DOWN;
        canMove         = true;
        Collider        = GetComponent <BoxCollider2D>();

        this._interactController = new PlayerInteractController(this, this.interactData);
    }
コード例 #5
0
    private void Start()
    {
        InteractBox      = GetComponent <BoxCollider2D>();
        this._gameState  = FindObjectOfType <GlobalGameStateManager>();
        this._typeWriter = FindObjectOfType <OverworldTypewriter>();

        this._audioSource = this.GetComponent <AudioSource>();

        Vector3 position = this.transform.position;

        this.OnStart();
    }
コード例 #6
0
    void OnGUI()
    {
        GUI.matrix = GlobalGameStateManager.PrepareMatrix();

        // prepare the style for the boxes
        boxStyle.font      = guiFont;
        boxStyle.fontSize  = 45;
        boxStyle.wordWrap  = true;
        boxStyle.alignment = TextAnchor.UpperCenter;

        drawIntroBox();

        GUI.matrix = Matrix4x4.identity;
    }
コード例 #7
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
     }
     else
     {
         instance = this;
     }
     savedStates = new List <GameState>();
     savedStates.Add(new GameState {
         areaName = "global"
     });
     SceneManager.LoadScene(startSceneIndex, LoadSceneMode.Additive);
 }
コード例 #8
0
    void OnGUI()
    {
        GUI.matrix = GlobalGameStateManager.PrepareMatrix();

        float percentFull = notoriety / notorietyMax;

        GUI.Box(new Rect(left, top, width, height), GUIContent.none);
        GUI.Box(new Rect(left, top + height * (1 - percentFull), width, height * percentFull), GUIContent.none);

        for (int i = 0; i < axemanCount; i++)
        {
            GUI.DrawTexture(new Rect(left + width, top + height / axemanCount * i, 40, height / (i + 1)), axemanHeadTexture, ScaleMode.ScaleToFit);
        }

        GUI.matrix = Matrix4x4.identity;
    }
コード例 #9
0
    void OnGUI()
    {
        GUI.matrix = GlobalGameStateManager.PrepareMatrix();

        // prepare the style for the boxes
        boxStyle.font      = guiFont;
        boxStyle.fontSize  = 45;
        boxStyle.wordWrap  = true;
        boxStyle.alignment = TextAnchor.UpperCenter;

        // prepare the style for buttons
        GUI.skin.button.normal.background = buttonImage;
        GUI.skin.button.hover.background  = buttonImage;
        GUI.skin.button.active.background = buttonImage;
        buttonStyle           = new GUIStyle(GUI.skin.button);
        buttonStyle.font      = guiFont;
        buttonStyle.fontSize  = 85;
        buttonStyle.alignment = TextAnchor.MiddleCenter;

        drawIntroBox();

        GUI.matrix = Matrix4x4.identity;
    }
コード例 #10
0
 // Start is called before the first frame update
 void Start()
 {
     Manager = FindObjectOfType <GlobalGameStateManager>();
 }
コード例 #11
0
 // Start is called before the first frame update
 void Start()
 {
     GameState = FindObjectOfType <GlobalGameStateManager>();
     InitWriter(false);
     Script = FindObjectOfType <ScriptData>();
 }
コード例 #12
0
 void Start()
 {
     Manager        = FindObjectOfType <GlobalGameStateManager>();
     style.fontSize = 30;
 }