Exemplo n.º 1
0
    private void Awake()
    {
        if (Instance)
        {
            Destroy(gameObject);
            return;
        }

        Instance   = this;
        objectList = new List <GameObject>();
    }
Exemplo n.º 2
0
    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>();
    }
Exemplo n.º 3
0
 private void Awake()
 {
     rb        = GetComponent <Rigidbody>();
     sonarPool = GetComponent <SonarPool>();
     interval  = Time.time + pingInterval;
 }