mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 04:57:10 +01:00
Grenade Fix
Grenade is now a Sphere. set Commented the [Command] on CmdFireBullet in Shoot.cs to see how it is in multiplayer
This commit is contained in:
@@ -46,10 +46,7 @@ public class Shoot : NetworkBehaviour
|
||||
}
|
||||
if (Input.GetButtonDown("Fire")) {
|
||||
updateCanvas = true;
|
||||
if(weapon.GetComponent<BoxCollider>().enabled == true) // NACH ANDERE L<>SUNG SUCHEN
|
||||
{
|
||||
weapon.GetComponent<BoxCollider>().enabled = false;
|
||||
}
|
||||
|
||||
// If current weapon kind is a rifle or pistole
|
||||
string weaponKindString = weapon.WeaponKind.ToString();
|
||||
if(weaponKindString == "Rifle" || weaponKindString == "Pistole") {
|
||||
@@ -89,7 +86,7 @@ public class Shoot : NetworkBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
[Command]
|
||||
// [Command]
|
||||
// This code will be executed on the Server.
|
||||
private void CmdFireBullet() {
|
||||
ray = new Ray(mCamera.transform.position, mCamera.transform.forward); // Raycast from Camera
|
||||
|
||||
Reference in New Issue
Block a user