Assets/Deps/emotitron/NST Example/Scripts/Weapon.cs
/// <summary>
/// This is the weapon fire code created for this example. It just creates a basic non-synced projectile.
/// </summary>
This is the weapon fire code created for this example. It just creates a basic non-synced projectile.
This is the weapon fire code created for this example . It just creates a basic non - synced projectile .
private void FireBullet(Vector3 pos, Quaternion rot, PlayerFireCustomMsg msg)
	{
		GameObject bullet = Instantiate(bulletPrefab);
		Rigidbody rb = bullet.GetComponent<Rigidbody>();
		bullet.transform.position = pos;
		bullet.transform.rotation = rot;
		bullet.GetComponentInChildren<MeshRenderer>().material.color = msg.color;
		Destroy(bullet, 1f);
		rb.velocity = bullet.transform.forward * 10;
	}
private void FireBullet ( Vector3 pos , Quaternion rot , PlayerFireCustomMsg msg ) { GameObject bullet = Instantiate ( bulletPrefab ) ; Rigidbody rb = bullet . GetComponent < Rigidbody > ( ) ; bullet . transform . position = pos ; bullet . transform . rotation = rot ; bullet . GetComponentInChildren < MeshRenderer > ( ) . material . color = msg . color ; Destroy ( bullet , 1f ) ; rb . velocity = bullet . transform . forward * 10 ; }
This is the weapon fire code created for this example.
This is the weapon fire code created for this example .
pos
Vector3
<not_specific>
rot
Quaternion
<not_specific>
msg
PlayerFireCustomMsg
<not_specific>