예제 #1
0
 private void Awake()
 {
     if (!Instance)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
예제 #2
0
    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;
        }
    }
예제 #3
0
    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;
    }
예제 #4
0
 private void Awake()
 {
     _storeUI          = GameObject.FindGameObjectWithTag("Store");
     storeUIController = _storeUI.GetComponent <StoreUIController>();
 }