Example #1
0
    private IEnumerator SliderBack()
    {
        PhotonNetwork.Disconnect();
        SaveFrame.gameObject.SetActive(false);
        ReturnButton.gameObject.SetActive(false);

        while (true)
        {
            if (SceneryRect.offsetMax.y <= 0 || SceneryRect.offsetMin.y <= 0)
            {
                SceneryRect.offsetMax = Vector2.zero;
                SceneryRect.offsetMin = Vector2.zero;
                break;
            }

            Vector2 offsetMax = SceneryRect.offsetMax;
            offsetMax.y          -= Time.deltaTime * 1200;
            SceneryRect.offsetMax = offsetMax;
            Vector2 offsetMin = SceneryRect.offsetMin;
            offsetMin.y          -= Time.deltaTime * 1200;
            SceneryRect.offsetMin = offsetMin;
            yield return(0);
        }
        isSelecting = false;
        CampaignSelectionManager.OnSelectionReturn();
    }
    IEnumerator SliderBack()
    {
        saveFrame.gameObject.SetActive(false);
        returnButton.gameObject.SetActive(false);
        while (true)
        {
            if (sceneryRect.offsetMax.y <= 0 || sceneryRect.offsetMin.y <= 0)
            {
                sceneryRect.offsetMax = Vector2.zero;
                sceneryRect.offsetMin = Vector2.zero;
                break;
            }

            Vector2 offsetMax = sceneryRect.offsetMax;
            offsetMax.y          -= Time.deltaTime * 1200;
            sceneryRect.offsetMax = offsetMax;
            Vector2 offsetMin = sceneryRect.offsetMin;
            offsetMin.y          -= Time.deltaTime * 1200;
            sceneryRect.offsetMin = offsetMin;
            yield return(0);
        }
        isSelecting = false;
        CampaignSelectionManager.OnSelectionReturn();
        yield break;
    }
Example #3
0
    public void SaveSelectionStart()
    {
        CampaignSelectionManager.OnSelectionStart(CampaignSelection.Multiplayer);
        SaveFrame.gameObject.SetActive(true);

        sliderCoroutine = SceneSlider();
        StartCoroutine(sliderCoroutine);
    }
 void Awake()
 {
     if (Instanse == null)
     {
         Instanse = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }