/// <summary> /// The method initializes the games and then starts it. /// </summary> public static void Main() { var constructor = new GameConstructor(); var gameBuilder = new ConsoleSizeableGameBuilder(new SimpleConsoleGameBuilder()); var game = constructor.SetupGame(gameBuilder); game.GameRun(); }
// Use this for initialization void Awake() { constructor = gameConstructor.GetComponent <GameConstructor> (); if (constructor.NumberOfPlayers < playerNr) { Destroy(gameObject); } //Create key coordinates for grid avat = dimensionsAvatar / 2; marginX = column2 - column1; startX = column1 - marginX; }
// Use this for initialization void Awake() { //define children and constructor selectionSprite = transform.FindChild("SelectionSprite"); avatarWheel = transform.FindChild("charWheelAvatar"); buttonUp = transform.FindChild("charWheelArrowUp"); buttonDown = transform.FindChild("charWheelArrowDown"); playerText = transform.FindChild("charWheelPlayer"); stateText = transform.FindChild("charWheelState"); startText = transform.FindChild("charWheelStart"); characterName = transform.FindChild("charWheelName"); constructor = gameConstructor.GetComponent <GameConstructor> (); lerper = GameObject.Find("lerpTimer"); if (lerper == null) { Debug.Log("No lerpTimer found"); } avatarWheel.renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat; avatarOffsetTarget = avatarWheel.renderer.material.mainTextureOffset.y; //hide inactives avatarWheel.renderer.enabled = false; selectionSprite.renderer.enabled = false; characterName.renderer.enabled = false; stateText.renderer.enabled = false; playerText.GetComponent <SpriteRenderer> ().material.color = textColorNormal; stateText.GetComponent <SpriteRenderer> ().material.color = textColorNormal; //characterName.GetComponent<SpriteRenderer> ().material.color = textColorNormal; GetComponent <SpriteRenderer> ().sprite = borderNormal; offsetDistance = 1f / nrOfCharacters; }
// Use this for initialization void Awake() { //define children and constructor selectionSprite = transform.FindChild ("SelectionSprite"); avatarWheel = transform.FindChild ("charWheelAvatar"); buttonUp = transform.FindChild ("charWheelArrowUp"); buttonDown = transform.FindChild ("charWheelArrowDown"); playerText = transform.FindChild ("charWheelPlayer"); stateText = transform.FindChild ("charWheelState"); startText = transform.FindChild ("charWheelStart"); characterName = transform.FindChild ("charWheelName"); constructor = gameConstructor.GetComponent<GameConstructor> (); lerper = GameObject.Find ("lerpTimer"); if (lerper == null){ Debug.Log ("No lerpTimer found"); } avatarWheel.renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat; avatarOffsetTarget = avatarWheel.renderer.material.mainTextureOffset.y; //hide inactives avatarWheel.renderer.enabled = false; selectionSprite.renderer.enabled = false; characterName.renderer.enabled = false; stateText.renderer.enabled = false; playerText.GetComponent<SpriteRenderer> ().material.color = textColorNormal; stateText.GetComponent<SpriteRenderer> ().material.color = textColorNormal; //characterName.GetComponent<SpriteRenderer> ().material.color = textColorNormal; GetComponent<SpriteRenderer> ().sprite = borderNormal; offsetDistance = 1f / nrOfCharacters; }