// Use this for initialization void Start() { GameObject player = GameObject.FindGameObjectWithTag("Player"); if (player != null) { skor = player.GetComponent <Skor>(); } }
private void button3_Click(object sender, EventArgs e) { dizin = Application.StartupPath + @"\sound\start.wav"; play(); Skor frm2 = new Skor(); this.Hide(); frm2.ShowDialog(); this.Show(); }
void OnTriggerEnter2D(Collider2D nesne) { if (nesne.gameObject.GetComponent <Kontrol>() == null) { return; } Skor.AddFruits(pointsToAdd); Destroy(gameObject); }
public HttpResponseMessage Put(int id, Skor skor) { if (SkorDAL.IsThereAnySkor(id) == false) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Böyle bir kayıt bulunamadı.")); } else if (ModelState.IsValid == false) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } else { return(Request.CreateResponse(HttpStatusCode.OK, SkorDAL.UpdateSkor(id, skor))); } }
public Skor UpdateSkor(int id, Skor skor) { db.Entry(skor).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(skor); }
public Skor InsertSkor(Skor skor) { db.Skorlar.Add(skor); db.SaveChanges(); return(skor); }
public JsonResult SetSkor(Skor skor) { skor.UserID = Convert.ToInt32(UserCheckAttribute.activeUserID); skorRepo.Insert(skor); return(Json(true, JsonRequestBehavior.AllowGet)); }
public HttpResponseMessage Post(Skor skor) { var createdSkor = SkorDAL.InsertSkor(skor); return(Request.CreateResponse(HttpStatusCode.Created, createdSkor)); }
void SkorKaydet(Skor s) { File.AppendAllText(@"D:\Skorlar.txt", $"{s.Player.Ad} {s.Player.Soyad} İsimli Oyuncu {s.Tarih} Tarihinde {s.Puan} Puan Aldı.\n\r"); }
void Start() { controller = GetComponent <CharacterController> (); anim = GetComponent <Animator> (); skor = GetComponent <Skor> (); }
void SkorKaydet(Skor s) { File.AppendAllText(@"D:\Skorlar.txt", $"{s.Player.Ad} {s.Player.Soyad} isimli oyuncu {s.Tarih} tarihinde {s.Puan} puan aldı.\r\n"); }