Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        gra mygra = (gra)target;

        EditorGUILayout.
    }
Esempio n. 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            gra gra = db.gras.Find(id);

            db.gras.Remove(gra);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "id_gra,nazwa,ograniczenie_wiekowe,gatunek,platforma,cena,release_year")] gra gra)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gra).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gra));
 }
Esempio n. 4
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        gra mygra = (gra)target;

        if (GUILayout.Button("Make bot"))
        {
            mygra.init();
        }
    }
Esempio n. 5
0
        public ActionResult Create([Bind(Include = "id_gra,nazwa,ograniczenie_wiekowe,gatunek,platforma,cena,release_year")] gra gra)
        {
            if (ModelState.IsValid)
            {
                db.gras.Add(gra);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(gra));
        }
Esempio n. 6
0
        // GET: gras/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            gra gra = db.gras.Find(id);

            if (gra == null)
            {
                return(HttpNotFound());
            }
            return(View(gra));
        }
Esempio n. 7
0
    void init(string name)
    {
        ///////////////////////////////////////////////////////
        ////// Initialize the gra object and give the arguments
        ///////////////////////////////////////////////////////
        if (soc_1 == null)
        {
            soc_1 = makeSocket(server_r, port_r);
        }
        // object and coordinate servers
        // in format ip:port
        server_o = getUrl(name + ".object", soc_1);
        if (server_o == null)
        {
            return;
        }
        server_c = getUrl(name + ".pos", soc_1);
        if (server_c == null)
        {
            return;
        }
        // split as "ip" and "port"
        string[] server_oo = server_o.Split(new Char[] { ':' });
        print(server_oo[0] + " " + server_oo[1]);
        string[] server_cc = server_c.Split(new Char[] { ':' });
        print(server_cc[0] + " " + server_cc[1]);

        if (mygra == null)
        {
            mygra = new gra();
        }
        // ip of the object server
        mygra.DownloadLink = server_oo[0];
        //DownloadLink = server_oo[0];

        //mygra.port = Int32.Parse(server_oo[1]);
        //port = Int32.Parse(server_oo[1]);

        // ip of the coordinate server
        mygra.IP = server_cc[0];
        //IP = server_cc[0];
        // port of the coords server
        //mygra.port = server_cc[1];

        mygra.name = name;
        makeobject = true;
    }
Esempio n. 8
0
 public void Start()
 {
     obj = GameObject.Find("Plane");
     GRA = obj.GetComponent <gra>();
 }