Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (player != null)
        {
            skor = player.GetComponent <Skor>();
        }
    }
Beispiel #2
0
        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();
        }
Beispiel #3
0
    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)));
     }
 }
Beispiel #5
0
 public Skor UpdateSkor(int id, Skor skor)
 {
     db.Entry(skor).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
     return(skor);
 }
Beispiel #6
0
 public Skor InsertSkor(Skor skor)
 {
     db.Skorlar.Add(skor);
     db.SaveChanges();
     return(skor);
 }
Beispiel #7
0
 public JsonResult SetSkor(Skor skor)
 {
     skor.UserID = Convert.ToInt32(UserCheckAttribute.activeUserID);
     skorRepo.Insert(skor);
     return(Json(true, JsonRequestBehavior.AllowGet));
 }
Beispiel #8
0
        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> ();
 }
Beispiel #11
0
 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");
 }