private void InitGame() { playersTurn = false; board = FindObjectOfType <BoardGenerator>(); enemies = new List <EnemyPathfinding>(); board.SetupScene(level); levelText.text = "Level: " + level; Debug.Log("LOADING LEVEL " + level); Invoke("HideLevelImage", levelStartDelay); }
// Initialize the whole game private void Initialize() { gameLog = ""; gameOver = false; AICelebrate = false; SetPlayerTurn(false); boardScript = GetComponent <BoardGenerator>(); boardScript.SetupScene(); aiScript = GetComponent <AIManager>(); aiScript.InitialiseAIs(); InitialiseDeposited(); gameLog += "--- Game Start ---\n"; }
// Initialize the whole game private void Initialize() { gameLog = ""; //redToken = ""; gameOver = false; AICelebrate = false; firstBlock = false; Unblocked_Reds = 0; Total_RealPath_Blocks = 0; Total_FalsePath_Blocks = 0; Total_RealPath_Blocks_Narrative = 0; Total_Blocks = 0; Task1_a = 0; Task1_b = 0; pathChange = 0; Real_Path_Replan = 0; SetPlayerTurn(false); boardScript = GetComponent <BoardGenerator>(); boardScript.SetupScene(); anchor_a1 = new Vector3(); anchor_a2 = new Vector3(); anchor_a3 = new Vector3(); anchor_a4 = new Vector3(); //Methods.instance.Task1Anchor(anchorPositions, out Task1_a, out Task1_b); //Debug.Log("a cost is:" + Task1_a); //Debug.Log("b cost is:" + Task1_b); aiScript = GetComponent <AIManager>(); aiScript.InitialiseAIs(); InitialiseDeposited(); //intillise before using //Methods.instance.Task1Anchor(GameManager.instance.anchorPositions, out GameManager.instance.Task1_a, out GameManager.instance.Task1_b); Methods.instance.Task2Set(); //Methods.instance.Task1Anchor(anchorPositions, out Task1_a, out Task1_b); //Debug.Log("a cost is:" + Task1_a); //Debug.Log("b cost is:" + Task1_b); //sr = GetComponent<SpriteRenderer>(); //test(); //ah = GetComponent<AutoHuma>(); //ah.InitialiseAH(); trueAnchorPos = new Vector3[2]; gameLog += "--- Game Start ---\n"; gameLog += "--- Color: 0-RED , 1- Yellow, 2- Blue---\n"; }