Beispiel #1
0
 private void ChangeProjectile()
 {
     if (Input.GetKeyDown(KeyCode.W))
     {
         if (currentGun == TypeGun.SPRING)
         {
             currentGun = TypeGun.ROD;
         }
         else if (currentGun == TypeGun.ROD)
         {
             currentGun = TypeGun.NORMAL;
         }
         else if (currentGun == TypeGun.NORMAL)
         {
             currentGun = TypeGun.SPRING;
         }
         else
         {
             currentGun++;
             Debug.Log(currentGun.ToString());
         }
         Debug.Log(currentGun.ToString());
     }
 }
Beispiel #2
0
 public GunIndex(string[] data)
 {
     this.id = int.Parse(data[0]);
     this.type = data[1];
     this.typeGun = GetPlayerTypeByString(type);
     this.level = int.Parse(data[2]);
     this.numberBulletMax = int.Parse(data[3]);
     this.numberBulletsOfCartridge = int.Parse(data[4]);
     this.damge = float.Parse(data[5]);
     this.ratioCrit = float.Parse(data[6]);
     this.valueCrit = float.Parse(data[7]);
 }