예제 #1
0
    /*
     * 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;
    }
예제 #2
0
    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);
        }
    }
예제 #3
0
    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);
        }
    }