/* * public Day (int p){ * this.Pressure = p; * } */ // Constructor. Takes in passed values to determine the weather of this day. public Day(int index, float temp, float pr, pressureRange p, cloudCover c, bool fog, float h, skyColor sc, precipitation prc, windType wt, float ws, seaState st, temperatureRange tr, windDirection wd) { this.Index = index; this.season = index / 6; this.Temperature = temp; this.Pressure = pr; this.PressureRange = p; this.Cloudcover = c; this.Fog = fog; this.Humidity = h; this.Skycolor = sc; this.Precipitation = prc; this.Windtype = wt; this.WindSpeed = ws; this.Seastate = st; this.Temprange = tr; this.WindDirection = wd; }
void Start() { if (this.GetComponent <PhotonView>().isMine) { isControlable = true; } else { isControlable = false; } if (isControlable) { var windGUIS = this.transform.parent.GetComponentsInChildren <Transform>(); foreach (Transform gui in windGUIS) { if (gui.CompareTag("windBar")) { windGUI = gui.gameObject; } } GameObject[] holders = GameObject.FindGameObjectsWithTag("Holder"); foreach (GameObject holds in holders) { if (holds.GetPhotonView().isMine) { projectileHolder = holds.gameObject; } } windFor = windGUI.GetComponent <EnergyBar>(); windDir = windGUI.GetComponent <windType>(); this.GetComponent <PhotonView>().RPC("RandomWind", PhotonTargets.All); } }
void Start() { if(this.GetComponent<PhotonView>().isMine){ isControlable=true; }else{ isControlable=false; } if(isControlable){ var windGUIS = this.transform.parent.GetComponentsInChildren<Transform>(); foreach( Transform gui in windGUIS){ if(gui.CompareTag("windBar")){ windGUI = gui.gameObject; } } GameObject[] holders = GameObject.FindGameObjectsWithTag("Holder"); foreach(GameObject holds in holders){ if(holds.GetPhotonView().isMine){ projectileHolder = holds.gameObject; } } windFor=windGUI.GetComponent<EnergyBar>(); windDir=windGUI.GetComponent<windType>(); this.GetComponent<PhotonView>().RPC("RandomWind",PhotonTargets.All); } }