// Use this for initialization void Start() { cuboid = GetComponent <CreateCuboid>(); uIManager = FindObjectOfType <UIManager>(); uIManager.UpdateText(uIManager.freeMovesText, "Free Moves: " + freeMoves); CreatePlayableArea(); }
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(); }
void Start() { cuboid = FindObjectOfType <CreateCuboid>(); playManager = FindObjectOfType <PlayManager>(); }
// Use this for initialization void Start() { cuboid = FindObjectOfType <CreateCuboid>(); }