예제 #1
0
        private void EditorControls()
        {
            int mvmtOffset = 1;

            if (Input.GetKey(KeyCode.LeftControl))
            {
                mvmtOffset = 10;
                if (Input.GetKey(KeyCode.LeftShift))
                {
                    mvmtOffset = 64;
                }
            }
            if (Input.GetKey(KeyCode.W))
            {
                mView.centerPosOnMap += Vector2Int.up * mvmtOffset; mView.OnMapUpdate(); return;
            }
            else if (Input.GetKey(KeyCode.A))
            {
                mView.centerPosOnMap += Vector2Int.left * mvmtOffset; mView.OnMapUpdate(); return;
            }
            else if (Input.GetKey(KeyCode.S))
            {
                mView.centerPosOnMap += Vector2Int.down * mvmtOffset; mView.OnMapUpdate(); return;
            }
            else if (Input.GetKey(KeyCode.D))
            {
                mView.centerPosOnMap += Vector2Int.right * mvmtOffset; mView.OnMapUpdate(); return;
            }
        }
예제 #2
0
    public IEnumerator LoadCampaignAndResources(string campaingName)
    {
        if (loadingStatusText != null)
        {
            loadingStatusText.text = "Loading Sprites...";
        }
        resourceLoader.Init();
        yield return(new WaitForEndOfFrame());

        if (loadingStatusText != null)
        {
            loadingStatusText.text = "Loading Map Files...";
        }
        mapExporter.LoadMap(campaingName);
        yield return(new WaitForEndOfFrame());

        mapViewport.OnMapUpdate();
        if (loadingScreenPanel != null)
        {
            loadingScreenPanel.SetActive(false);
        }

        yield break;
    }