void Start() { dead = false; turnScript = GameObject.Find("Manager").GetComponent <turnManager>(); InvokeRepeating("GiveMino", 2f, Random.Range(2, 6)); Invoke("Go", 1f); }
// Use this for initialization void Start() { cam = GameObject.FindObjectOfType <Camera>(); body2D = GetComponent <Rigidbody2D>(); renderer2D = GetComponent <SpriteRenderer>(); GameController = GameObject.FindGameObjectWithTag("GameController"); referenceScript = GameController.GetComponent <turnManager>(); }
// Use this for initialization void Start() { //get script turnManager turnManager_Script = turnManager_GameObject.GetComponent <turnManager>(); //get script heroController heroController_Script = heroController_GameObject.GetComponent <heroController>(); _isFreeze = false; }
void Start() { // This part is necessary for any spawned prefab // This will change to "gameController(Clone)" if we decide to instantiate the gameController GameObject gameController = GameObject.Find ("gameController"); iManager = gameController.GetComponent<inputManager> (); tManager = gameController.GetComponent<turnManager> (); SS = gameController.GetComponent<functionManager> (); dataBase = gameController.GetComponent<statsManager> (); myPlayer = this.gameObject; time=-1; turn=0; //actStack = new LinkedList<action>(); }
void Start() { ///need to have a fade in black out /// /// /// turnScript = GameObject.Find("Manager").GetComponent <turnManager>(); cellSize = GameObject.Find("MazeGen").GetComponent <makemaze>().cubesize; turnScript.OnMinoTurn += NewTurn; allDirections[0] = transform.forward; allDirections[1] = transform.right; allDirections[2] = -transform.forward; allDirections[3] = -transform.right; }
void Start(){ ///need to have a fade in black out /// /// /// turnScript = GameObject.Find("Manager").GetComponent<turnManager>(); cellSize = GameObject.Find("MazeGen").GetComponent<makemaze>().cubesize; turnScript.OnMinoTurn += NewTurn; allDirections[0] = transform.forward; allDirections[1] = transform.right; allDirections[2] = -transform.forward; allDirections[3] = -transform.right; }
// Use this for initialization void Start() { //use variable in turnManagerScript turnManager_Script = turnManager_GameObject.GetComponent <turnManager>(); buttonManager_script = buttonManager_obj.GetComponent <Dynamicbtn>(); //set type of each level if (turnManager_Script.typeHeroSkill == 1) // normal mode { freezeButton.gameObject.SetActive(false); starImage.gameObject.SetActive(false); //print("typeHeroSkill 1"); } if (turnManager_Script.typeHeroSkill == 3) // star mode { freezeButton.gameObject.SetActive(false); _textStarBack.text = " /" + turnManager_Script.countStarWin; } if (turnManager_Script.typeHeroSkill == 2) // freeze mode { starImage.gameObject.SetActive(false); } endGameImageWin.gameObject.SetActive(false); endGameImageLose.gameObject.SetActive(false); restartGame.gameObject.SetActive(false); _winPointX = turnManager_Script.winPoint.x; _winPointZ = turnManager_Script.winPoint.z; _isEndGame = turnManager_Script.isEndGame; _textAP.text = " " + turnManager_Script.actionPoint; turnManager_Script.enviTurn = 0; _countStar = 0; _useFreeze = 0; _isChangeState = false; _isclick = false; _targetPosition = transform.position; }
void Start() { photonView = GetComponent<PhotonView> (); // This part is necessary for any spawned prefab // This will change to "gameController(Clone)" if we decide to instantiate the gameController GameObject gameController = GameObject.Find ("gameController"); iManager = gameController.GetComponent<inputManager> (); tManager = gameController.GetComponent<turnManager> (); SS = gameController.GetComponent<functionManager> (); //dataBase = gameController.GetComponent<statsManager> (); // Photon stuff PhotonNetwork.logLevel = PhotonLogLevel.Full; PhotonNetwork.ConnectUsingSettings ("0.2"); StartCoroutine ("UpdateConnectionString"); PhotonNetwork.autoJoinLobby = true; }
void initPlayer() { // This part is necessary for any spawned prefab // This will change to "gameController(Clone)" if we decide to instantiate the gameController GameObject gameController = GameObject.Find ("gameController"); iManager = gameController.GetComponent<inputManager> (); tManager = gameController.GetComponent<turnManager> (); SS = gameController.GetComponent<functionManager> (); database = GameObject.Find ("stats").GetComponent<statsManager> (); myPlayer = this.gameObject; energy = database.playerStartEnergy; exp.Add("momentum",0); exp.Add("explosive",0); exp.Add("particle",0); exp.Add("field",0); hasTech.Add("momentum",true); hasTech.Add("explosive",true); hasTech.Add("particle",false); hasTech.Add("field",false); techPanel.Add("momentum",GameObject.Find("momentumPanel")); techPanel.Add("explosive",GameObject.Find("explosivePanel")); techPanel.Add("particle",GameObject.Find("particlePanel")); techPanel.Add("field",GameObject.Find("fieldPanel")); time = -1; turn = 0; waitCount = 0; // This is not a permanent solution // But it sure ensure that all movements (espeacially ones involving collisions) // are done in a stepTime speed = 3 / database.stepTime; // Temp photonView = PhotonView.Get (this); // You have to add it as a component for the Update and Start methods to run // Pretty disturbing if you think about it... // All players start with blaster //print ("typeof:" + currWeapon.GetType().ToString ()); //distinguishes which player is to be controlled if (photonView.isMine) { iManager.setMyPlayer (this); playerIndex = 0; playerMenu = GameObject.Find("currentWeaponMenu").GetComponent<playerWpnMenu>(); playerMenu.setMyPlayer(this); // Add blaster as starting weapon addWeapon (0); setWeapon (0); GameObject.Find ("player1Energy").GetComponent<Text> ().text = PhotonNetwork.player.name + ": " + this.energy.ToString (); GameObject.Find("Main Camera").GetComponent<cameraMovement>().setPlayer(this.gameObject); } else { playerIndex = 1; // The other player gets a different database for its set of weapons (they are different instances) database = Instantiate(database); playerMenu = GameObject.Find("oppoentWeaponMenu").GetComponent<playerWpnMenu>(); playerMenu.setMyPlayer(this); GameObject.Find ("player2Energy").GetComponent<Text>().text = PhotonNetwork.otherPlayers[0].name + ": " + this.energy.ToString(); } }
// Use this for initialization void Start() { turnManager_Script = turnManager_GameObject.GetComponent <turnManager>(); //heroController_Script = heroController_GameObject.GetComponent<heroController>(); }
void Start() { // This part is necessary for any spawned prefab // This will change to "gameController(Clone)" if we decide to instantiate the gameController tManager = GetComponent<turnManager> (); SS = GetComponent<functionManager> (); database = GameObject.Find ("stats").GetComponent<statsManager> (); targetLine = GetComponent <LineRenderer> (); myPlayerIsSet = false; // Only temporary commandable = false; buildButton.SetActive (false); maxSteps = database.maxSteps; // Only temporary }
void Start(){ dead = false; turnScript = GameObject.Find("Manager").GetComponent<turnManager>(); InvokeRepeating ("GiveMino", 2f, Random.Range (2, 6)); Invoke ("Go", 1f); }