Example #1
0
    //MISC

    //Class to create a gateData object from the currently placed gates in the scene
    private gateData createGateData()
    {
        gateData retData = new gateData();

        Gate dGate = GameObject.Find("Gate").GetComponent <Gate>();

        retData.db  = dGate;
        retData.dx  = dGate.transform.position.x;
        retData.dy  = dGate.transform.position.x;
        retData.dz  = dGate.transform.position.x;
        retData.drx = dGate.transform.position.x;
        retData.dry = dGate.transform.position.x;
        retData.drz = dGate.transform.position.x;

        //if (GameObject.Find("SecondGate") != null)
        //{
        //    SecondGate sGate = GameObject.Find("SecondGate").GetComponent<SecondGate>();
        //    retData.db = sGate;
        //    retData.sx = sGate.transform.position.x;
        //    retData.sy = sGate.transform.position.x;
        //    retData.sz = sGate.transform.position.x;
        //    retData.srx = sGate.transform.position.x;
        //    retData.sry = sGate.transform.position.x;
        //    retData.srz = sGate.transform.position.x;

        //}

        //if (GameObject.Find("MinuteGate") != null)
        //{
        //    MinuteGate mGate = GameObject.Find("MinuteGate").GetComponent<MinuteGate>();
        //    retData.db = mGate;

        //    retData.mx = mGate.transform.position.x;
        //    retData.my = mGate.transform.position.x;
        //    retData.mz = mGate.transform.position.x;
        //    retData.mrx = mGate.transform.position.x;
        //    retData.mry = mGate.transform.position.x;
        //    retData.mrz = mGate.transform.position.x;

        //}

        //if (GameObject.Find("HourGate") != null)
        //{
        //    HourGate hGate = GameObject.Find("HourGate").GetComponent<HourGate>();
        //    retData.hb = hGate;

        //    retData.hx = hGate.transform.position.x;
        //    retData.hy = hGate.transform.position.x;
        //    retData.hz = hGate.transform.position.x;
        //    retData.hrx = hGate.transform.position.x;
        //    retData.hry = hGate.transform.position.x;
        //    retData.hrz = hGate.transform.position.x;

        //}

        return(retData);
    }
Example #2
0
    //[XmlAttribute("hx")]
    //public float hx { get; set; }
    //[XmlAttribute("hy")]
    //public float hy { get; set; }
    //[XmlAttribute("hz")]
    //public float hz { get; set; }
    //[XmlAttribute("hrx")]
    //public float hrx { get; set; }
    //[XmlAttribute("hry")]
    //public float hry { get; set; }
    //[XmlAttribute("hrz")]
    //public float hrz { get; set; }

    public Puzzle(float x1, float y1, float z1, gateData gates)
    {
        pX = x1;
        pY = y1;
        pZ = z1;

        db  = gates.db;
        dx  = gates.dx;
        dy  = gates.dy;
        dz  = gates.dz;
        drx = gates.drx;
        dry = gates.dry;
        drz = gates.drz;



        sb = gates.sb;
        sc = gates.sc;
        //sx = gates.sx;
        //sy = gates.sy;
        //sz = gates.sz;
        //srx = gates.srx;
        //sry = gates.sry;
        //srz = gates.srz;

        mb = gates.mb;
        mc = gates.mc;
        //mx = gates.mx;
        //my = gates.my;
        //mz = gates.mz;
        //mrx = gates.mrx;
        //mry = gates.mry;
        //mrz = gates.mrz;

        hb = gates.hb;
        hc = gates.hc;
        //hx = gates.hx;
        //hy = gates.hy;
        //hz = gates.hz;
        //hrx = gates.hrx;
        //hry = gates.hry;
        //hrz = gates.hrz;
    }