Beispiel #1
0
    public void Shoot()
    {
        rb.UnLockTransform();
        Vector3 force = new Vector3(0, 5, 0);

        rb.ApplyImpulse(force + transform.forward * 50); // Forward impulse
        rb.ApplyTorqueForce(new Vector3(0, 0, 40));      // Fall force
    }
    public void Shoot()
    {
        rb.UnLockTransform();
        Vector3 force = new Vector3(0, 5, 0);

        rb.ApplyImpulse(force + speed * 100); // Forward impulse
        rb.ApplyTorqueForce(speed * 40);      // Fall force
    }
Beispiel #3
0
 public void CheckDrawning()
 {
     if (level_map[curr_x, curr_y] == 3) //Valryian Fire!
     {
         if (GetLinkedObject("player_obj").GetComponent <CharactersManager>().god_mode == false)
         {
             CompRigidBody rb = GetComponent <CompRigidBody>();
             rb.UnLockMotion();
             rb.ApplyImpulse(new Vector3(0.0f, -50.0f, 0.0f));
             //char_manager.Drown();
             drowning = true;
         }
     }
 }
 public void Shoot()
 {
     rb.ApplyImpulse(speed * speed_projectil);
 }
Beispiel #5
0
 public void Shoot()
 {
     rb.ApplyImpulse(vfront * vel); // Forward impulse
     rb.ApplyTorqueForce(new Vector3(0, 0, 40));
 }