Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            texture texture = db.texture.Find(id);

            db.texture.Remove(texture);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        void IState.Init()
        {
            _t = cache.GetTexture("gui/settingstabs");
            CursorMove(-1);

            _m = (menu)statemanager.history.Peek();

            _tab = 0;
            UpdateMenu();
        }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "id_texture,label")] texture texture)
 {
     if (ModelState.IsValid)
     {
         db.Entry(texture).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(texture));
 }
Exemplo n.º 4
0
        public ActionResult Create([Bind(Include = "id_texture,label")] texture texture)
        {
            if (ModelState.IsValid)
            {
                db.texture.Add(texture);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(texture));
        }
Exemplo n.º 5
0
        // GET: Texture/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            texture texture = db.texture.Find(id);

            if (texture == null)
            {
                return(HttpNotFound());
            }
            return(View(texture));
        }
Exemplo n.º 6
0
        public static texture GetTexture(string name, bool cache = true)
        {
            if (HasTexture(name) && cache)
            {
                return(Texturecache[name]);
            }

            var tex = new texture(name);

            if (cache)
            {
                Texturecache.Add(name, tex);
            }
            return(tex);
        }
Exemplo n.º 7
0
    void Start()
    {
        myCam = (texture)plan.GetComponent <texture>();       //GameObject.GetComponent<T>()

        // Checks how many and which cameras are available on the device
        if (WebCamTexture.devices.Length > 1)
        {
            for (int cameraIndex = 0; cameraIndex < WebCamTexture.devices.Length; cameraIndex++)

            {
                // We want the back camera

                if (WebCamTexture.devices[cameraIndex].name != "Integrated Camera")

                {
                    //webCameraTexture = new WebCamTexture(cameraIndex, Screen.width, Screen.height);

                    webCameraTexture = new WebCamTexture(WebCamTexture.devices[cameraIndex].name, 1000, 1000);


                    // Here we flip the GuiTexture by applying a localScale transformation

                    // works only in Landscape mode

                    //myCameraTexture.transform.localScale = new Vector3(1,1,1);
                }
            }
        }
        else
        {
            webCameraTexture = new WebCamTexture(WebCamTexture.devices[0].name, 1000, 1000, 60);
        }

        myCam.textures = webCameraTexture;


        myCam.textures = webCameraTexture;
        //print(webCameraTexture.height);
        //print(webCameraTexture.width);
        // Starts the camera

        webCameraTexture.Play();
    }
Exemplo n.º 8
0
        // Take the selected texture and return it
        public Texture2D getTexture(texture selectedTexture)
        {
            switch (selectedTexture)
            {
            case texture.platform1:
                return(platform1);

            case texture.platform2:
                return(platform2);

            case texture.platform3:
                return(platform3);

            case texture.scroll:
                return(scrollOfNope);

            case texture.heart:
                return(heart);

            default:
                return(null);
            }
        }
Exemplo n.º 9
0
 public void DrawViewmodel(texture t, uint x, uint y, uint sx, uint sy, uint rw, uint ry)
 {
     t.Draw(x, y, sx, sy, rw, ry,
            level.lightmap[(int)(world.Player.pos.x * renderer.TEXSIZE),
                           (int)(world.Player.pos.y * renderer.TEXSIZE)]);
 }
Exemplo n.º 10
0
 DrawTextureRectRegion(texture, rect, null, modulate);
Exemplo n.º 11
0
 Texture_Internal(texture, placement.rect, placement.uvs, color);
Exemplo n.º 12
0
 ref var quad    = ref GetBatchQuad(texture, sortKey);
Exemplo n.º 13
0
 AddSpriteToBatch(texture, bounds, offsetFromCenter, r, scale);
Exemplo n.º 14
0
 public void SetTexture(string name)
 {
     _texname = name;
     Tex      = cache.GetTexture(name);
 }