private void Start() { pH = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); isReady = true; timeToStart = 3; if (pH.isPlayScene) { isReady = false; } //timeCantBeHit = 3; photonView = PhotonView.Get(this); selfQuat = transform.rotation; sp1 = GameObject.Find("sp1"); sp2 = GameObject.Find("sp2"); Hp = 5; gameObject.transform.GetChild(0).GetChild(0).GetComponent <Text>().text = photonView.owner.NickName + " Hp:" + Hp; if (photonView.owner.ID % 2 == 0) { gameObject.GetComponent <SpriteRenderer>().color = new Color(1, 0, 0); } else { gameObject.GetComponent <SpriteRenderer>().color = new Color(0, 1, 0); } currSpr = 0; currSpBull = 0; prevDir.y = 1; }
private void Awake() { // Test CheckRegister(); //CheckRegister(); phoCon = GameObject.Find("photonScript").GetComponent <PhotonConnect>(); phoHan = GetComponent <photonHandler>(); }
private void Awake() { rollerCoverThrowUI = GameObject.Find("RollerCoverThrowUI"); rollerCoverJumpUI = GameObject.Find("RollerCoverJumpUI"); rollerCoverDownUI = GameObject.Find("RollerCoverDownUI"); rollerCoverPickupUI = GameObject.Find("RollerCoverPickupUI"); rollerCoverBuff = GameObject.Find("RollerCoverBuff"); countDownObj_BuffUI = GameObject.Find("CountDownText_BuffUI"); throwIcon = GameObject.Find("ThrowEmptyLogo"); emptyText = GameObject.Find("EmptyText"); countDownText = GameObject.Find("CountDownText_ThrowUI"); groupThrowPanelUI = GameObject.Find("GroupThrowPanelUI"); for (int i = 0; i < trashIcon.Length; i++) { trashIcon[i] = groupThrowPanelUI.transform.GetChild(i + 3).gameObject; trashIcon[i].SetActive(false); } for (int j = 0; j < trashIconText.Length; j++) { trashIconText[j] = groupThrowPanelUI.transform.GetChild(j + 14).gameObject; trashIconText[j].SetActive(false); } photonHandler phoHand = photonHandler.instance; photonPlayer = phoHand.photonPlayer; print(photonPlayer); scale = transform.localScale; textObjScale = textObj.transform.localScale; gmr = GameManager.instance; if (!devTesting && photonView.isMine) { sceneCam = GameObject.Find("Main Camera"); if (sceneCam != null) { sceneCam.SetActive(false); } plCam.SetActive(true); photonView.RPC("SFXCeatorFind", PhotonTargets.AllBuffered); plNameText.text = PhotonNetwork.playerName; joystick = GameObject.Find("RollerScrollPanel").GetComponent <VirtualJoyStick>(); countDownText_BuffUI = countDownObj_BuffUI.GetComponent <TextMeshProUGUI>(); rollerCoverBuffImg = rollerCoverBuff.GetComponent <Image>(); buffBtn = rollerCoverBuff.GetComponent <Button>(); pickupBtn = rollerCoverPickupUI.GetComponent <ButtonController>(); jumpBtn = rollerCoverJumpUI.GetComponent <ButtonController>(); downBtn = rollerCoverDownUI.GetComponent <ButtonController>(); throwBtn = rollerCoverThrowUI.GetComponent <ButtonController>(); countDownText.SetActive(false); countDownObj_BuffUI.SetActive(false); AddBuffButton(); } if (!photonView.isMine) { plNameText.text = photonView.owner.name; } }
private void SwitchTime(int index) { photonHandler phoHand = photonHandler.instance; curRC.textTime.text = curRC.timeTag[index] + " " + "MINUTES"; curRC.timePre.text = curRC.timeTag[index]; phoHand.time = float.Parse(curRC.timeTag[index]); curRC.descriptionTexts[1].text = curRC.timesDescription[index]; }
// En el caso de que no haya coneccion se procede a crear una nueva coneccion y se le asigna la version // se llama la funcion para mantener la pantalla siempre encendida. private void Awake() { if (!PhotonNetwork.connected) { PhotonNetwork.ConnectUsingSettings(versionName); Debug.Log("connecting to photon"); } this.photonHandler = GetComponent <photonHandler>(); PantallaSiempreEncendida(); }
private void Awake() { CheckMainMenuScene(); instance = this; DontDestroyOnLoad(this.transform); photonView = GetComponent <PhotonView>(); PhotonNetwork.sendRate = 30; PhotonNetwork.sendRateOnSerialize = 20; SceneManager.sceneLoaded += OnSceneFinishedLoading; print(SceneManager.GetActiveScene().name); }
// Start is called before the first frame update void Start() { PossibleTargets = new List <GameObject>(); pHandler = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); enemyMgr = GameObject.Find("photonDontDestroy").GetComponent <EnemyManager>(); movementSpeed = 2; attackSpeed = 0.7f; nextAtk = 0.3f; healthBar.GetComponent <Slider>().maxValue = maxHealth; Nexus = GameObject.Find("map_holder").transform.Find("Nexus").gameObject; colliders = new Collider2D[25]; }
void Start() { pHandler = GameObject.Find("PhotonStatic").GetComponent <photonHandler>(); spawnId = pHandler.spawnId; if (spawnId == 1) { offset = new Vector3(1f, 0f, 1f); } else if (spawnId == 2) { offset = new Vector3(5f, 0f, 1f); } else if (spawnId == 3) { offset = new Vector3(10f, 0f, 1f); } else if (spawnId == 4) { offset = new Vector3(15f, 0f, 1f); } if (!photonView.isMine) { return; } stats = GameObject.FindGameObjectWithTag("stats"); temp = GameObject.Find("Canvas"); temp.SetActive(false); if (photonView.isMine) { stats.SetActive(false); } fp = GameObject.Find("FinalPositions").GetComponent <FinalPositions>(); area = GameObject.Find("SewerMap").GetComponent <SetRaceTrack>(); AgentReset(); b1 = GameObject.Find("b3"); b2 = GameObject.Find("b4"); b3 = GameObject.Find("b5"); b4 = GameObject.Find("b6"); b3.SetActive(false); b4.SetActive(false); }
// Update is called once per frame void Update() { int i = 0; foreach (CarAgent agent in fp.positions) { temp[i] = agent.gameObject.name; i++; } for (int j = 0; j < i; j++) { txt[j].text = temp[j]; } if (pH == null) { pH = GameObject.Find("PhotonStatic").GetComponent <photonHandler>(); } }
// Start is called before the first frame update private void Start() { get = 0; pH = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); photonView = PhotonView.Get(this); wintext = GameObject.Find("finish.Text").GetComponent <Text>(); Time.timeScale = 1; if (gameObject.tag == "brick") { hp = 5; } if (gameObject.tag == "flag") { hp = 1; } if (gameObject.tag == "const") { hp = 1; } }
private void Start() { pHandler = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); healthBar.GetComponent <Slider>().maxValue = MaxHealth; }
private void Awake() { phohand = photonHandler.instance; }
// Start is called before the first frame update void Start() { pHandler = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); }
private void Start() { photonHandler phoHand = photonHandler.instance; phoHand.time = 3; }
void Start() { pHandler = GameObject.Find("photonDontDestroy").GetComponent <photonHandler>(); lManager = GameObject.Find("LevelManager").GetComponent <MenuManager>(); eManager = GameObject.Find("LevelManager").GetComponent <EconomyManager>(); }