Exemple #1
0
 void FixedUpdate()
 {
     if (playerScript.isShot())
     {
         if (timePassed > 2f)
         {
             playerScript.changeShot(false);
             timePassed = 0f;
         }
         transform.position += new Vector3(0, 9f * Time.deltaTime * playerCoef * projDirection, 0);
         timePassed         += Time.deltaTime;
     }
     else
     {
         Destroy(transform.gameObject);
     }
 }