Beispiel #1
0
        public static void Main()
        {
            WinUI WinUI = new WinUI();

            WinUI.Run();
            //this is my note.
        }
Beispiel #2
0
        public static void Main()
        {
            WinUI WinUI = new WinUI();

            WinUI.Run();
            // anoter comment
            // new comment!!!!
        }
Beispiel #3
0
    public void PlayerWin()
    {
        //audioManager.PlaySound("Win");
        Debug.Log("Test");
        //Player Win
        //Time.timeScale = 0f;

        WinUI.SetActive(true);
    }
Beispiel #4
0
    /// <summary>
    /// 显示胜利界面
    /// </summary>
    /// <returns></returns>
    IEnumerator IEWin()
    {
        DisableFruits(true);

        SoundController.Sound.Win();
        GameController.gameController.FruitStar.gameObject.transform.GetChild(0).gameObject.SetActive(false);
        yield return(new WaitForSeconds(1f));

        WinUI.SetActive(true);
        showFullAds();
    }
    // Start is called before the first frame update
    public override void Start()
    {
        base.Start();


        //make sure the winUI is set up
        if (winUIRef == null)
        {
            winUIRef = WinUI.S;
        }
    }
 void Start()
 {
     CabinUi     = transform.GetComponentInChildren <CabinUI>();
     ForestUi    = transform.GetComponentInChildren <ForestUI>();
     MarketUi    = transform.GetComponentInChildren <MarketUI>();
     WifiTowerUi = transform.GetComponentInChildren <WifiTowerUI>();
     MainMenuUi  = transform.GetComponentInChildren <MainMenuUI>();
     TopMenuUi   = transform.GetComponentInChildren <TopMenuUI>();
     EndDayUi    = transform.GetComponentInChildren <EndDayUI> ();
     WinUi       = transform.GetComponentInChildren <WinUI> ();
     WinUi.gameObject.SetActive(false);
 }
Beispiel #7
0
    public override void OnStartLocalPlayer()
    {
        Camera.main.transform.SetParent(transform);
        Camera.main.transform.localPosition = new Vector2(0, 0);

        playerNameObj.transform.localPosition = new Vector2(-0.05f, 0.25f);
        playerNameObj.transform.localScale    = new Vector2(0.1f, 0.1f);

        string name = PlayerNameInput.DisplayName;

        CmdSetupPlayer(name);

        //Setting stats
        maxHp      = 100;
        currentHp  = maxHp;
        experience = 0;
        level      = 1;

        //If player is host and client, auto ready
        if (!isClientOnly)
        {
            isReady = true;
        }

        if (SceneManager.GetActiveScene().buildIndex == 2)
        {
            /*
             * NetworkManager2 nm2 = FindObjectOfType<NetworkManager2>();
             * nm2.checkPlayerClass(netIdentity.netId);*/
            //Finding components
            NetworkManager3 nm3 = FindObjectOfType <NetworkManager3>();
            nm3.checkPlayerClass(netIdentity.netId);
            talentTree  = FindObjectOfType <TalentTree>();
            hud         = GameObject.FindGameObjectWithTag("HUD").GetComponent <HUD>();
            deathScreen = FindObjectOfType <DeathUI>();
            winScreen   = FindObjectOfType <WinUI>();

            talentTree.GetComponent <Canvas>().enabled = false;
            CmdSetMaxHealth(currentHp, maxHp, netId);
            CmdSetMaxExp(experience, 100, level, netId);
        }
        else if (SceneManager.GetActiveScene().buildIndex == 1)
        {
            //Finding components
            hud = GameObject.FindGameObjectWithTag("HUD").GetComponent <HUD>();

            CmdSetMaxHealth(currentHp, maxHp, netId);
            CmdSetMaxExp(experience, 100, level, netId);
        }

        activateClassScripts();
    }
Beispiel #8
0
    private void Start()
    {
        if (S == null)
        {
            S = this;
        }
        else
        {
            Destroy(this);
        }

        this.gameObject.SetActive(false);
    }
 public string ToMarkdown()
 {
     return(new MarkdownBuilder()
            .AddHeader("Windows Template Studio", Year, Month)
            .AddTable("Category", "Type", Platform)
            .AddSectionTitle("Project Generation by category")
            .AddCollapsible("Uwp Project Generation", Uwp.ToMarkdown())
            .AddCollapsible("Wpf Project Generation", Wpf.ToMarkdown())
            .AddCollapsible("WinUI Project Generation", WinUI.ToMarkdown())
            .AddTable("Windows Template Studio entry point", "Entry point", entryPoint)
            .AddTable("Programming languages", "Languages", Language)
            .GetText());
 }
Beispiel #10
0
    public void PlayerWin()
    {
        Paused = true;
        AudioController.Instance.StopInGameMusicAudio();
        AudioController.Instance.PlayWinSoundAudio();
        Time.timeScale = 0;
        WinUI.SetActive(true);

        if (PlayerPrefs.GetInt("Level") < unlockLevel)
        {
            PlayerPrefs.SetInt("Level", unlockLevel);
        }

        PlayerPrefs.SetInt("Gold", currentGold + 50);
    }
Beispiel #11
0
    // Start is called before the first frame update
    public override void Start()
    {
        base.Start();
        thisCam = GetComponent <CinemachineVirtualCamera>();


        _dolly = thisCam.GetCinemachineComponent <CinemachineTrackedDolly>();

        if (UICanvas == null)
        {
            UICanvas = FindObjectOfType <Countdown>().gameObject;
        }
        UICanvas.SetActive(false);

        if (winUIRef == null)
        {
            winUIRef = WinUI.S;
        }
    }
Beispiel #12
0
    public void Init()
    {
        if (cameraRef == null)
        {
            cameraRef = this.gameObject;
        }

        if (cameraOptions == CameraOptions.side)
        {
            //SHOULD GO IN INIT
            //y angle = -90 or 270
            startingYAngle = 270;
            //apply
            cameraRotationSetter   = cameraRef.transform.eulerAngles;
            cameraRotationSetter.y = startingYAngle;

            //x angle starts off as 45
            //y pso offset starts at 10
            cameraYOffset = 10;
            //z pos offset = 0
            cameraZOffset = 0;
        }

        else if (cameraOptions == CameraOptions.front)
        {
            //SHOULD GO IN INIT
            //y angle = -90 or 270
            startingYAngle         = 180;
            cameraRotationSetter   = cameraRef.transform.eulerAngles;
            cameraRotationSetter.y = startingYAngle;
            //x angle starts off as 45
            //y pso offset starts at 10
            cameraYOffset = 10;
            //z pos offset = 0
            cameraXOffset = 0;
        }

        //get players
        if (GameManager.S != null)
        {
            //print("P4" + GameManager.S.player4.activeSelf);

            //if (GameManager.S.player1.activeSelf)
            {
                player1ref = GameManager.S.player1;
            }
            //if (GameManager.S.player2.activeSelf)
            {
                player2ref = GameManager.S.player2;
            }
            //if (GameManager.S.player3.activeSelf)
            {
                player3ref = GameManager.S.player3;
            }
            //if (GameManager.S.player4.activeSelf)
            {
                player4ref = GameManager.S.player4;
            }
        }
        else
        {
            print("Camera: GameManager is null");
        }



        if (winUIRef == null)
        {
            winUIRef = WinUI.S;
        }

        deathLerpTime = player1ref.GetComponent <PlayerDeath>().respawnTime * .8f;

        distanceList = new List <float>();

        //StartCoroutine(LateStart());
    }
Beispiel #13
0
 //导出
 protected override void btnExport_Click(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor; WinUI.ToExcel(dgv, this.Text); this.Cursor = Cursors.Default;
 }
Beispiel #14
0
        public static void Main()
        {
            WinUI WinUI = new WinUI();

            WinUI.Run();
        }
Beispiel #15
0
 public void WinReturnToMenu()
 {
     winScreen = FindObjectOfType <WinUI>();
     winScreen.ReturnToMenu(netId);
 }
 public void PlayerWin()
 {
     WinUI.SetActive(true);
     SoundManager.instance.RandomizeSfx(winSound);
     gameOver = true;
 }