예제 #1
0
 // Use this for initialization
 void Start()
 {
     cuboid    = GetComponent <CreateCuboid>();
     uIManager = FindObjectOfType <UIManager>();
     uIManager.UpdateText(uIManager.freeMovesText, "Free Moves: " + freeMoves);
     CreatePlayableArea();
 }
예제 #2
0
        private void OnMouseDown(object sender, MouseEventArgs e)
        {
            CreateCuboid newCuboid = new CreateCuboid(modelSpace.Project.CreateNewOperationId());

            //The width,height,depth of cuboid is setted with default value now
            //We'll improve it next version by using mouse draging
            Length.LengthUnit unit  = modelSpace.Project.Environment.DefaultLengthUnit;
            float             value = modelSpace.Project.Environment.GridSize.Value * 2;

            newCuboid.Width  = new Length(value, unit);
            newCuboid.Height = new Length(value, unit);
            newCuboid.Depth  = new Length(value, unit);

            //Get the refPoint
            Vector3 refPoint = modelSpace.SceneRender.DisplayedGridPoint;

            newCuboid.RefPoint = new Vector3WithUnit(refPoint, modelSpace.Project.Environment.DefaultLengthUnit);

            //Create the new single
            modelSpace.Project.CreateNewSingle(newCuboid);

            workspace.SelectTool();
        }
예제 #3
0
 void Start()
 {
     cuboid      = FindObjectOfType <CreateCuboid>();
     playManager = FindObjectOfType <PlayManager>();
 }
예제 #4
0
 // Use this for initialization
 void Start()
 {
     cuboid = FindObjectOfType <CreateCuboid>();
 }