public async Task <ActionResult <Gust> > PostGust(Gust gust) { _context.Gusts.Add(gust); await _context.SaveChangesAsync(); return(CreatedAtAction("GetGust", new { id = gust.GustId }, gust)); }
public async Task <IActionResult> PutGust(Guid id, Gust gust) { if (id != gust.GustId) { return(BadRequest()); } _context.Entry(gust).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GustExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public object Clone() { Gust gust = new Gust(); gust.unlocked = this.unlocked; gust.unlockedAt = this.unlockedAt; return(gust); }
private void SetGusts() { for (int i = 0; i < Gusts.Length; i++) { Gust g = Gusts[i]; float offset = (float)i / Gusts.Length; float gustOffset = offset * i + Random.value * offset * 0.8f; g.SetProperties(i); } }
public Smoke() { this.MouseActive = true; this.TextureFilter = Sprite.TextureFilters.High; this.Scaling = new EPointF(5, 5); this.Ink = RasterOps.ROPs.AddPin; this.Create(100, 100); lwidth = this.Width / res; lheight = this.Height / res; v = new vsquare[lwidth + 1][]; for (int i = 0; i < v.Length; i++) { v[i] = new vsquare[lheight + 1]; } vbuf = new vbuffer[lwidth + 1][]; for (int i = 0; i < vbuf.Length; i++) { vbuf[i] = new vbuffer[lheight + 1]; } p = new particle[pnum]; CurrentColor = Color.FromArgb(2, 255, 0, 0); ERectangle emitter = ERectangle.FromLTRB(this.Width / 2 - 20, this.Height - 20, this.Width / 2 + 20, this.Height); for (int i = 0; i < pnum; i++) { p[i] = new particle(emitter, this); p[i].Init(); } for (int i = 0; i <= lwidth; i++) { for (int u = 0; u <= lheight; u++) { v[i][u] = new vsquare(i * res, u * res, this); vbuf[i][u] = new vbuffer(i * res, u * res, this); } } RandomGust = new Gust(); }
public Smoke() { this.MouseActive = true; this.TextureFilter = Sprite.TextureFilters.High; this.Scaling = new EPointF(5,5); this.Ink = RasterOps.ROPs.AddPin; this.Create(100,100); lwidth = this.Width/res; lheight = this.Height/res; v = new vsquare[lwidth+1][]; for (int i=0; i<v.Length;i++) v[i] = new vsquare[lheight+1]; vbuf = new vbuffer[lwidth+1][]; for (int i=0; i<vbuf.Length;i++) vbuf[i] = new vbuffer[lheight+1]; p = new particle[pnum]; CurrentColor = Color.FromArgb(2,255,0,0); ERectangle emitter = ERectangle.FromLTRB(this.Width/2-20,this.Height-20,this.Width/2+20,this.Height); for(int i = 0; i < pnum; i++) { p[i] = new particle(emitter, this); p[i].Init(); } for(int i = 0; i <= lwidth; i++) { for(int u = 0; u <= lheight; u++) { v[i][u] = new vsquare(i*res,u*res, this); vbuf[i][u] = new vbuffer(i*res,u*res, this); } } RandomGust = new Gust(); }
// Start is called before the first frame update void Start() { TMPro.text = "Explore and Find the flowers"; rb = gameObject.GetComponent <Rigidbody2D>(); gust = FindObjectOfType <Gust>(); }