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; }
void Awake() { GameState = FindObjectOfType <GlobalGameStateManager>(); textList = new string[] { }; InitTypewriter(false); Script = FindObjectOfType <ScriptData>(); }
// Start is called before the first frame update void Start() { GameState = FindObjectOfType <GlobalGameStateManager>(); NpcWriter = FindObjectOfType <TypeWriter>(); ChoiceWriter = FindObjectOfType <ChoiceWriter>(); targetHp = hp; currentScriptKey = BossIndex; }
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); }
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(); }
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; }
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); }
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; }
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; }
// Start is called before the first frame update void Start() { Manager = FindObjectOfType <GlobalGameStateManager>(); }
// Start is called before the first frame update void Start() { GameState = FindObjectOfType <GlobalGameStateManager>(); InitWriter(false); Script = FindObjectOfType <ScriptData>(); }
void Start() { Manager = FindObjectOfType <GlobalGameStateManager>(); style.fontSize = 30; }