changes?
This commit is contained in:
parent
5f81e96eed
commit
970a2a5697
@ -180,7 +180,7 @@ MonoBehaviour:
|
|||||||
_addedNetworkObject: {fileID: 1069525110278255243}
|
_addedNetworkObject: {fileID: 1069525110278255243}
|
||||||
_networkObjectCache: {fileID: 1069525110278255243}
|
_networkObjectCache: {fileID: 1069525110278255243}
|
||||||
_componentConfiguration: 0
|
_componentConfiguration: 0
|
||||||
_synchronizeParent: 0
|
_synchronizeParent: 1
|
||||||
_packing:
|
_packing:
|
||||||
Position: 1
|
Position: 1
|
||||||
Rotation: 1
|
Rotation: 1
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using FishNet.Object;
|
||||||
|
using FishNet;
|
||||||
|
|
||||||
namespace Item
|
namespace Item
|
||||||
{
|
{
|
||||||
public class BulletComponent : MonoBehaviour
|
public class BulletComponent : NetworkBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private float duration = 5f;
|
[SerializeField] private float duration = 5f;
|
||||||
|
|
||||||
@ -22,6 +24,8 @@ namespace Item
|
|||||||
{
|
{
|
||||||
register = Item.FlareRegister.instance;
|
register = Item.FlareRegister.instance;
|
||||||
register.bullets.Add(this);
|
register.bullets.Add(this);
|
||||||
|
this.transform.parent = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
@ -134,6 +134,7 @@ namespace Item
|
|||||||
[ServerRpc]
|
[ServerRpc]
|
||||||
public void Fire(bool offsetWithTargetBall)
|
public void Fire(bool offsetWithTargetBall)
|
||||||
{
|
{
|
||||||
|
|
||||||
shootLightDuration = 0;
|
shootLightDuration = 0;
|
||||||
shootLight.gameObject.SetActive(true);
|
shootLight.gameObject.SetActive(true);
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ public class PlayerInteractionHandler : NetworkBehaviour
|
|||||||
{
|
{
|
||||||
if (tempInvent.GetQuantityOf(pistol.projectileName) > 0)
|
if (tempInvent.GetQuantityOf(pistol.projectileName) > 0)
|
||||||
{
|
{
|
||||||
|
print("Calling RPC:Fire(). Isclient:" + IsClient);
|
||||||
pistol.Fire();
|
pistol.Fire();
|
||||||
noiseManager.ShotFired();
|
noiseManager.ShotFired();
|
||||||
tempInvent.Remove(pistol.projectileName);
|
tempInvent.Remove(pistol.projectileName);
|
||||||
|
Reference in New Issue
Block a user