Skip to content
Snippets Groups Projects
Commit 1628e835 authored by jan's avatar jan
Browse files

yo

parent e00a41a4
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,8 @@ using System.Collections;
public class Movement : NetworkBehaviour
{
/* GameObjects */
public GameObject bulletPrefab;
public GameObject arm;
private GameObject camera;
/* Movement */
......@@ -23,6 +23,7 @@ public class Movement : NetworkBehaviour
//Enable camera and audiolistener for this local player
GetComponentInChildren<Camera>().enabled = true;
GetComponentInChildren<AudioListener>().enabled = true;
arm.GetComponent<MeshRenderer>().enabled = true;
Cursor.visible = false;
......@@ -80,7 +81,7 @@ public class Movement : NetworkBehaviour
//Shooting
if (Input.GetKeyDown(KeyCode.Space))
CmdFire();
Fire();
/*
* temporary
......@@ -90,7 +91,7 @@ public class Movement : NetworkBehaviour
}
[Command]
void CmdFire()
void Fire()
{
GameObject bullet = (GameObject)Instantiate(bulletPrefab, transform.position - transform.forward, Quaternion.identity);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment