Пример #1
0
        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>();
        }
Пример #2
0
    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;
    }
Пример #3
0
 private void Start()
 {
     _renderer        = GetComponent <Renderer>();
     _spawnController = GameObject.Find("Spawn_Manager").GetComponent <ISpawnController>();
 }
Пример #4
0
 private void Awake()
 {
     spawnController = FindObjectOfType <SpawnController>();
     audioController = FindObjectOfType <AudioController>();
 }