public ActionResult DeleteConfirmed(int id) { texture texture = db.texture.Find(id); db.texture.Remove(texture); db.SaveChanges(); return(RedirectToAction("Index")); }
void IState.Init() { _t = cache.GetTexture("gui/settingstabs"); CursorMove(-1); _m = (menu)statemanager.history.Peek(); _tab = 0; UpdateMenu(); }
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)); }
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)); }
// 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)); }
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); }
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(); }
// 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); } }
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)]); }
DrawTextureRectRegion(texture, rect, null, modulate);
Texture_Internal(texture, placement.rect, placement.uvs, color);
ref var quad = ref GetBatchQuad(texture, sortKey);
AddSpriteToBatch(texture, bounds, offsetFromCenter, r, scale);
public void SetTexture(string name) { _texname = name; Tex = cache.GetTexture(name); }