void Start() { //Find references toolbox = FindObjectOfType <Toolbox>(); if (toolbox == null) { Debug.LogError("toolbox not found!!!"); } em = toolbox.GetComponent <EventManager>(); gameManager = toolbox.GetComponent <GameManager>(); Transform respawnPointHolder = transform. GetComponentInChildren <RespawnPointHolderTag>().transform; foreach (Transform child in respawnPointHolder) { respawnPoints.Add(child); } Transform powerUpPositionHolder = transform. GetComponentInChildren <PowerUpPositionsHolderTag>().transform; foreach (Transform child in powerUpPositionHolder) { powerUpPositions.Add(child); } //Find globalVariableLibrary and get variables from it lib = toolbox.GetComponent <GlobalVariableLibrary>(); GetStats(); //Send respawnPoint list to GameManager and broadcast NewSceneLoaded gameManager.SetRespawnPoints(respawnPoints); gameManager.SetPowerUpPositions(powerUpPositions); em.BroadcastNewSceneLoaded(mySceneIndex); }
void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); shipInfoManager = toolbox.GetComponent <ShipInfoManager>(); GetStats(); }
private void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); rb = GetComponent <Rigidbody>(); GetStats(); }
void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponentInChildren <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); GetStats(); cameraParent = transform.parent; }
private void Awake() { serverState = ServerState.DEFAULT; toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); shipInfoManager = toolbox.GetComponent <ShipInfoManager>(); GetStats(); }
private void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); powerUpPlatformEffect = transform.GetChild(1).GetComponent <ParticleSystem>(); powerUpPickupEffect = transform.GetChild(2).GetComponent <ParticleSystem>(); powerUpObject = GetComponentInChildren <PowerUpAnimator>().gameObject; powerUpPlatformCollider = transform.GetComponent <Collider>(); GetStats(); }
void Start() { toolbox = FindObjectOfType <Toolbox>(); if (toolbox == null) { Debug.LogError("toolbox not found!!!"); } em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); GetStats(); em.BroadcastNewSceneLoaded(mySceneIndex); }
void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); shipInfoManager = toolbox.GetComponent <ShipInfoManager>(); GetStats(); if (networkFunctionalityDisabled) { this.enabled = false; } }
protected virtual void Awake() { toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponentInChildren <GlobalVariableLibrary>(); shipInfoManager = toolbox.GetComponent <ShipInfoManager>(); rb = GetComponent <Rigidbody>(); shipColorableParts = GetComponentsInChildren <ShipColorablePartTag>(); shipHull = GetComponentInChildren <ShipHullTag>().transform; shipTurret = GetComponentInChildren <ShipTurretTag>().transform; turretOutputMarker = GetComponentInChildren <TurretOutputMarkerTag>(). transform; healthBar = GetComponentInChildren <ShipHealthBarTag>().gameObject; }
private void Awake() { #region Singletonization if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); #endregion }
void Awake() { #region Singletonization if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); #endregion toolbox = FindObjectOfType <Toolbox>(); em = toolbox.GetComponent <EventManager>(); lib = toolbox.GetComponent <GlobalVariableLibrary>(); GetStats(); }