Exemplo n.º 1
0
        private void InitilizeMarket()
        {
            BlockInitilized = true;
            MyAPIGateway.TerminalControls.CustomControlGetter += CreateControlsNew;
            ProjectorBlock.RefreshCustomInfo();

            AllBlocks.Add(ProjectorBlock);
            Utils.Log("Market Initilized");
        }
        // Context: Client
        private void ReceivedNewState()
        {
            if (_state.BuildState == State.Waiting || _state.BuildState == State.Building)
            {
                buildPower = GetPower();
            }

            if (_state.BuildState == State.Waiting)
            {
                NeedsUpdate = MyEntityUpdateEnum.EACH_FRAME;
            }
            else
            {
                Timer       = 0;
                NeedsUpdate = MyEntityUpdateEnum.NONE;
                me.RefreshCustomInfo();
            }
            sink.Update();
            RefreshUI();
        }