コード例 #1
0
        }   // end of BaseMouseEditTool Update()

        /// <summary>
        /// Override this to provide a place to initialize
        /// anything that needs to be done on a per-use basis.
        /// </summary>
        public virtual void OnActivate()
        {
            // Get references.  We can't do this in the
            // c'tor since not all of these exist yet.
            inGame = Boku.InGame.inGame;
            shared = inGame.shared;

            materialPicker = inGame.mouseEditUpdateObj.ToolBox.MaterialPicker;
            waterPicker    = inGame.mouseEditUpdateObj.ToolBox.WaterPicker;
            brushPicker    = inGame.mouseEditUpdateObj.ToolBox.BrushPicker;

            starting     = true;
            StretchPhase = Phase.Open;

            shared.editBrushIndex = prevBrushIndex;
            shared.editBrushStart = shared.editBrushPosition;

            //HelpOverlay.Push(helpOverlayID);
            inGame.Cursor3D.Rep          = Cursor3D.Visual.Pointy;
            inGame.Cursor3D.DiffuseColor = Vector4.One;

            terrainSpeed = Common.Xml.XmlOptionsData.TerrainSpeed; // just cache this.

            isInAction = false;
        }
コード例 #2
0
        }   // end of MaterialPicker DecrementFocus()

        private void RefreshPositions()
        {
            // Handy references.
            Boku.InGame        inGame = Boku.InGame.inGame;
            Boku.InGame.Shared shared = inGame.shared;

            OnSetType(curIndex);

            lastChangedTime = Time.WallClockTotalSeconds;
        }   // end of MaterialPicker RefreshPositions()
コード例 #3
0
        }   // end of DecrementFocus()

        protected override void UpdateIndex()
        {
            // Handy references.
            Boku.InGame        inGame = Boku.InGame.inGame;
            Boku.InGame.Shared shared = inGame.shared;

            UIGrid2DBrushElement e = (UIGrid2DBrushElement)grid.SelectionElement;

            shared.editBrushIndex = e.BrushIndex;

            lastChangedTime = Time.WallClockTotalSeconds;
        }   // end of BrushPicker UpdateIndex()