// Use this for initialization void Start() { sPos = transform.position; laPos = "Left"; timer = 0; player = GameObject.FindGameObjectWithTag("Player"); WorldSwitch = (WorldSwitch)GameObject.FindGameObjectWithTag("WorldSwitch").GetComponent("WorldSwitch"); }
private void Awake() { if (instance) { Debug.LogError("2+ WorldSwitchers found!"); } instance = this; }
void Start() { gameController = GameObject.FindWithTag("GameController"); worldSwitch = gameController.GetComponent <WorldSwitch>(); checkpoint = gameController.GetComponent <checkpoints>(); }