Пример #1
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);
        }
Пример #2
0
 public void Update()
 {
     _powerPanel.UpdateValue();
     _weatherPanel.UpdateValue();
     _moneyPanel.SetValue(GameData.PlayerData.Money);
     shop.RequestUpdate();
 }
Пример #3
0
 public void Update()
 {
     _powerPanel.UpdateValue();
     _weatherPanel.UpdateValue();
 }
Пример #4
0
 public void Update()
 {
     _weatherPanel.UpdateValue();
     _turnLabel.SetText("経過ターン:" + GameData.PlayerData.Turn.ToString());
 }
Пример #5
0
 public void Update()
 {
     _powerPanel.UpdateValue();
     _weatherPanel.UpdateValue();
     _ranchPanel.UpdateDisplay();
 }