private void Awake() { if (!Instance) { Instance = this; } else { Destroy(gameObject); } }
public void Start() { ui = GameObject.FindGameObjectWithTag("UIStore").GetComponent <StoreUIController>(); camTr = Camera.main.GetComponent <Transform>(); swipe = GameObject.FindGameObjectWithTag("Swipe").GetComponent <SwipeInput>(); if (PlayerInfo.info.unlockNextShape) { UnlockNextShape(); delayInSeconds = 1; } }
public void Start() { ui = GameObject.FindGameObjectWithTag("UIStore").GetComponent <StoreUIController>(); float ratio = refPixelWidth / Camera.main.pixelWidth; speed = ratio * refSpeed; colorSpeed = ratio * refColorSpeed; maxXPosition = (PlayerInfo.info.allPlayerShapes.Length - 1) * StoreManager.spaceBetweenObjects; Vector3 pos = cam.position; pos.x = PlayerInfo.info.activePlayerShapeIndex * StoreManager.spaceBetweenObjects; pos.z = -10; cam.position = pos; posX = pos.x; slider.MaxValue = maxXPosition; slider.Value = posX; }
private void Awake() { _storeUI = GameObject.FindGameObjectWithTag("Store"); storeUIController = _storeUI.GetComponent <StoreUIController>(); }