示例#1
0
 public void NoClick()
 {
     Instantiate(NoBox);
     LogText.WriteLog(gm.GameName + "은(는) 신직업이 없을 것이라고 밝혔다.");
     MoneyPanel.Hide(true);
     box.OnClick();
 }
示例#2
0
        protected override void OnAdded()
        {
            //背景
            var background = new SpriteNode();

            background.Texture  = Texture2D.Load("bg_main.jpg");
            background.Position = new Vector2F(0, 0);
            background.ZOrder   = Common.Parameter.ZOrder.BackGround;
            AddChildNode(background);

            var sign = new SpriteNode();

            sign.Texture  = Texture2D.Load("homesign.png");
            sign.Position = new Vector2F(0, 0);
            sign.ZOrder   = Common.Parameter.ZOrder.Panel;
            AddChildNode(sign);

            _powerPanel = new PowerPanel();
            _powerPanel.SetPosition(new Vector2F(sign.Texture.Size.X, 0));
            _powerPanel.SetNode(this);
            _powerPanel.UpdateValue();

            _moneyPanel = new MoneyPanel();
            _moneyPanel.SetPosition(new Vector2F(sign.Texture.Size.X, _powerPanel.GetHeight()));
            _moneyPanel.SetNode(this);
            _moneyPanel.SetValue(GameData.PlayerData.Money);

            _weatherPanel = new WeatherPanel();
            _weatherPanel.SetPosition(new Vector2F(sign.Texture.Size.X, _powerPanel.GetHeight() + _moneyPanel.GetHeight()));
            _weatherPanel.SetNode(this);
            _weatherPanel.UpdateValue();

            menu = new CommonMenu(this);
        }
    void Update()
    {
        if (countDown <= 0 && stop == false && making == false)
        {
            StartCoroutine(SpawnBlock(round));
            countDown = timeBetweenWaves;
        }

        if (waveStart != GameObject.Find("UserData").GetComponent <PlayerStats>().waveIndex&& stop == true && enemies.Count == 0)
        {
            Debug.Log("Cambiando de juego");
            //changeScene = true;
            StartCoroutine(ChangeScene());
        }



        countDown -= Time.deltaTime;

        countDown = Mathf.Clamp(countDown, 0f, Mathf.Infinity);

        roundPanel.GetComponent <Text>().text  = GameObject.Find("UserData").GetComponent <PlayerStats>().waveIndex.ToString();
        healthPanel.GetComponent <Text>().text = PlayerStats.life.ToString();
        MoneyPanel.GetComponent <Text>().text  = PlayerStats.money.ToString();
        ScorePanel.GetComponent <Text>().text  = PlayerStats.score.ToString();
    }
示例#4
0
 void Start()
 {
     MoneyPanel.Hide(false);
     gm  = GameManager.gm;
     box = GetComponent <EventBox>();
     box.DisableHotkey = true;
     CostText.GetComponent <Text>().text = "개발 착수 (" + NewClassCost + "G)";
 }
示例#5
0
文件: Macro.cs 项目: ialy1595/NDB
 public void KeepMacro()
 {
     GameManager.gm.fame -= 1000;
     // 디버깅 팀의 개발자 한 명당 매크로 지속시간이 10초씩 줄어듭니다.
     ActivityEnd = GameManager.gm.time + 100f;// -10f * (float)Mathf.Min(10, Developer.dev.developerCount[Developer.dev.FindPostIDByName("Debugging")]);
     Debug.Log(ActivityEnd);
     Debug.Log(GameManager.gm.time);
     GameManager.gm.DaramDeath += MacroActivity;
     LogText.WriteLog("매크로가 게임에 판을 치고 있다.");
     MoneyPanel.Hide(true);
     GameManager.gm.Pause(false);
     Destroy(gameObject);
 }
示例#6
0
文件: Macro.cs 项目: ialy1595/NDB
 public void KillMacroByMoney()
 {
     if (GameManager.gm.Money() >= 3000)
     {
         GameManager.gm.ChangeMoneyInRound(-3000);
         GameManager.gm.fame += 1000;
         LogText.WriteLog("돈을 투입해 열심히 매크로를 잡았다.");
         MoneyPanel.Hide(true);
         GameManager.gm.Pause(false);
         Destroy(gameObject);
     }
     else
     {
         GameManager.gm.ShowMessageBox("돈이 부족합니다.");
     }
 }
示例#7
0
文件: Macro.cs 项目: ialy1595/NDB
    public void KillMacroByGM()
    {
        // 버그 담당 GM이 일할 곳. 수정바람.
        Post modifyingDeveloper = Developer.dev.FindPostByPostID(Developer.dev.FindPostIDByName("Debugging"));

        if (Developer.dev.UseDeveloper(modifyingDeveloper))
        {
            LogText.WriteLog("버그GM을 투입해 열심히 매크로를 잡는중...(10초 소요)");
            Instantiate(MacroWork).GetComponent <MacroWork>().modifyingDeveloper = modifyingDeveloper;
            MoneyPanel.Hide(true);
            GameManager.gm.Pause(false);
            Destroy(gameObject);
        }
        else
        {
            GameManager.gm.ShowMessageBox("버그GM이 부족합니다.");
        }
    }
示例#8
0
    public void YesClick()
    {
        if (gm.Money() >= NewClassCost)
        {
            gm.ChangeMoneyInRound(-NewClassCost);
            NewClassCost += 5000;
            Instantiate(YesBox);

            MoneyPanel.Hide(true);
            gm.FameChange      += FameUp_NewClass1;
            gm.FameChange      -= gm.FameBug;
            gm.RoundStartEvent += NewClassCreated;
            LogText.WriteLog("개발팀이 신직업 개발에 착수했다!!");
            LogText.WriteLog("신직업이 나온다는 소식만으로 게임의 인기가 상승하고 있다.");
            UserChat.CreateChat("신직업 빨리 나오게 해주세요 ㅠㅠ", 3);
            box.OnClick();
        }
        else
        {
            LogText.WriteLog("돈이 부족합니다.");
        }
    }
示例#9
0
文件: Macro.cs 项目: ialy1595/NDB
 void Start()
 {
     GetComponent <EventBox>().DisableHotkey = true;
     MoneyPanel.Hide(false);
 }