//can be overridden public virtual void Start() { tokenTypes = (Object[])Resources.LoadAll("_Core/Tokens/"); //grabbing prefabs gridArray = new GameObject[gridWidth, gridHeight]; //creating the grid MakeGrid(); //populating the grid matchManager = GetComponent <MatchManagerScript>(); //assigning scripts to variables inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); }
public virtual void Start() { tokenTypes = (Object[])Resources.LoadAll("_Core/Tokens/"); gridArray = new GameObject[gridWidth, gridHeight]; MakeGrid(); matchManager = GetComponent <MatchManagerScript>(); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); }
public virtual void Start() { //load the tokens, make the grid, and create references to the other scripts tokenTypes = (Object[])Resources.LoadAll("Tokens/"); gridArray = new GameObject[gridWidth, gridHeight]; MakeGrid(); matchManager = GetComponent <MatchManagerScript>(); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); }
public virtual void Start() { tokenTypes = Resources.LoadAll("Tokens/"); gridArray = new GameObject[gridWidth, gridHeight]; MakeGrid(); matchManager = GetComponent <MatchManagerScript>(); Debug.Assert(matchManager != null, "Attach a match manager to this object."); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); }
public virtual void Awake() { tokenTypes = (UnityEngine.Object[])Resources.LoadAll("Tokens/"); noteSprites = Resources.LoadAll <Sprite>("Sprites/Note sprites"); gridArray = new GameObject[gridWidth, gridHeight]; matchManager = GetComponent <MatchManagerScript>(); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); numberManager = GetComponent <NumberManager>(); stringGraphic = Resources.Load("String") as GameObject; timeBetweenBeats = 60.0f / bpm; music = GameObject.Find(SPEAKER_OBJ).GetComponent <AudioSource>(); healthText = transform.root.Find(UI_CANVAS).Find(HEALTH_TEXT).GetComponent <Text>(); MakeGrid(); ChangeGridDuplicates(); }
public virtual void Start() { //load the tokens, make the grid, and create references to the other scripts tokenTypes = (UnityEngine.Object[])Resources.LoadAll("Tokens/"); dummySprites = Resources.LoadAll <Sprite>("Sprites/Dummy sprites"); gridArray = new GameObject[gridWidth, gridHeight]; matchManager = GetComponent <MatchManagerScript>(); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); scoreManager = transform.root.Find("Score canvas").Find("Score").GetComponent <ScoreManager>(); stringGraphic = Resources.Load("String") as GameObject; MakeGrid(); ChangeGridDuplicates(); SceneManager.LoadScene(INSTRUCTION_SCENE_NAME, LoadSceneMode.Additive); winLoseManager = GetComponent <WinLoseManager>(); chordsRemaining = transform.root.Find(SCORE_CANVAS).Find(CHORDS_REMAINING).GetComponent <Text>(); ChordsPlayed = 0; //set the text correctly at the start of the game scoreRequired = transform.root.Find(SCORE_CANVAS).Find(SCORE_REQUIRED).GetComponent <Text>(); scoreRequired.text = winLoseManager.ScoreToWin + " to win"; }
public virtual void Start() { _tokenTypes = Resources.LoadAll("ChessPieces/"); gridArray = new GameObject[gridWidth, gridHeight]; MakeGrid(); if (playerColor == ChessPiece.PieceColor.Black) { opponentColor = ChessPiece.PieceColor.White; } else { opponentColor = ChessPiece.PieceColor.Black; } matchManager = GetComponent <MatchManagerScript>(); inputManager = GetComponent <InputManagerScript>(); repopulateManager = GetComponent <RepopulateScript>(); moveTokenManager = GetComponent <MoveTokensScript>(); opponentController = GetComponent <OpponentController>(); }
public virtual void Start() { moveManager = GetComponent <MoveTokensScript>(); gameManager = GetComponent <GameManagerScript>(); }
[SerializeField] Vector2 exchangeGridPos2; //The position of exchangeToken2 in the scene. //ADDED this public void Awake() { instance = this; }
public virtual void Start() { moveManager = GetComponent <MoveTokensScript>(); gameManager = GetComponent <GameManagerScript>(); playerMatch = false; }
public virtual void Start() { moveManager = GetComponent <MoveTokensScript>(); gameManager = GetComponent <GameManagerScript>(); selectionIcon = Instantiate(Resources.Load("Selection marker"), offScreen, Quaternion.identity) as GameObject; }
// Start is called before the first frame update void Start() { _gameManager = GetComponent <GameManagerScript>(); _moveTokensScript = GetComponent <MoveTokensScript>(); }
void Start() { _inputManager = GetComponent <InputManagerScript>(); _moveTokens = GetComponent <MoveTokensScript>(); }
public virtual void Start() { _moveManager = GetComponent <MoveTokensScript>(); _gameManager = GetComponent <GameManagerScript>(); _cam = Camera.main; }