private void Awake() { if (Instance) { Destroy(gameObject); return; } Instance = this; objectList = new List <GameObject>(); }
private void Awake() { if (photonView.IsMine) { photonView.RPC(nameof(RPC_SetSubSettings), RpcTarget.AllBufferedViaServer, GameManager.SP.playerData.subBaseSelected, GameManager.SP.playerData.subEngineSelected, GameManager.SP.playerData.subCannonSelected); } sp = GetComponent <SonarPool>(); pm = GetComponent <PlayerMovement>(); pb = GetComponentInChildren <ParticleBehaviour>(); pc = GetComponent <PlayerCannon>(); ph = GetComponent <PlayerHealth>(); }
private void Awake() { rb = GetComponent <Rigidbody>(); sonarPool = GetComponent <SonarPool>(); interval = Time.time + pingInterval; }