public override void OnAwake() { base.OnAwake(); iSpawnController = GetComponent <ISpawnController>(); syncTransform = GetComponent <SyncTransform>(); syncOwner = GetComponent <SyncOwner>(); transform.GetNestedComponentsInChildren <IOnStateChange, NetObject>(onStateChangeCallbacks); transform.GetComponents(flagTeleportCallbacks); mountsLookup = netObj.GetComponent <MountsManager>(); }
public void Start() { GameObject controller = GameObject.FindGameObjectWithTag("GameController"); spawn = controller.GetComponent <ISpawnController>(); if (spawn == null) { Debug.Log("Spawn controller not found"); } // scoreController = controller.GetComponent<IScoreController>(); // if (scoreController == null) // { // Debug.LogError("Score controller not found"); // } // offscreenUIController = controller.GetComponent<IOffscreenUIController>(); // if (offscreenUIController == null) // { // Debug.LogError("Offscreen UI Controller not found"); // } // playerId = GetComponent<PlayerScore>().playerId; }
private void Start() { _renderer = GetComponent <Renderer>(); _spawnController = GameObject.Find("Spawn_Manager").GetComponent <ISpawnController>(); }
private void Awake() { spawnController = FindObjectOfType <SpawnController>(); audioController = FindObjectOfType <AudioController>(); }