public AlignTileAny(PlacementManager pMan) : base(pMan) { }
public AlignTileSolid(PlacementManager pMan) : base(pMan) { }
public AlignSimilar(PlacementManager pMan) : base(pMan) { }
public AlignNone(PlacementManager pMan) : base(pMan) { }
// Use this for initialization void Start() { Instance = this; audio = GetComponent <AudioSource>(); }
public SnapgridBorder(PlacementManager pMan) : base(pMan) { }
public ConstructionMenu() { IoCManager.InjectDependencies(this); Placement = (PlacementManager)IoCManager.Resolve <IPlacementManager>(); Placement.PlacementChanged += OnPlacementChanged; Title = "Construction"; var hSplitContainer = new HSplitContainer(); // Left side var recipes = new VBoxContainer { CustomMinimumSize = new Vector2(150.0f, 0.0f) }; SearchBar = new LineEdit { PlaceHolder = "Search" }; RecipeList = new Tree { SizeFlagsVertical = SizeFlags.FillExpand, HideRoot = true }; recipes.AddChild(SearchBar); recipes.AddChild(RecipeList); hSplitContainer.AddChild(recipes); // Right side var guide = new VBoxContainer(); var info = new HBoxContainer(); InfoIcon = new TextureRect(); InfoLabel = new Label { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.ShrinkCenter }; info.AddChild(InfoIcon); info.AddChild(InfoLabel); guide.AddChild(info); var stepsLabel = new Label { SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter, Text = "Steps" }; guide.AddChild(stepsLabel); StepList = new ItemList { SizeFlagsVertical = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.None }; guide.AddChild(StepList); var buttonsContainer = new HBoxContainer(); BuildButton = new Button { SizeFlagsHorizontal = SizeFlags.FillExpand, TextAlign = Label.AlignMode.Center, Text = "Build!", Disabled = true, ToggleMode = true }; EraseButton = new Button { TextAlign = Label.AlignMode.Center, Text = "Clear Ghosts", ToggleMode = true }; buttonsContainer.AddChild(BuildButton); buttonsContainer.AddChild(EraseButton); guide.AddChild(buttonsContainer); hSplitContainer.AddChild(guide); Contents.AddChild(hSplitContainer); BuildButton.OnToggled += OnBuildToggled; EraseButton.OnToggled += OnEraseToggled; SearchBar.OnTextChanged += OnTextEntered; RecipeList.OnItemSelected += OnItemSelected; PopulatePrototypeList(); PopulateTree(); }
private void Create4Way(PlacementManager placementManager, CellType[] result, Vector3Int temporaryPosition) { placementManager.ModifyStructureModel(temporaryPosition, fourWay, Quaternion.identity); }
public BuildingManager(PlacementManager placementManager,int cellSize,int width,int length) { this.grid = new GridStructure(cellSize, width, length); this.placementManager = placementManager; }
GameObject placeholder; //A local copy of this image's reference prefab //Reset() is called in the editor whenever we add a script to an object or choose "Reset" from the component menu. //We use this method to fill in script properties as we can perform heavy searching methods here without it //affecting performance at runtime void Reset() { //Find a reference to the placement manager placementManager = GameObject.FindObjectOfType <PlacementManager> (); }
public void SwitchCreation() { PlacementManager.Clear(); PlacementManager.SnapToWater = false; PlacementManager.BeginPlacement(GetCreationObject, DecalsInfo.Current.Place, false); }
private void ButtonRegenBoard_Clicked(object sender, EventArgs e) { ResetVariables(); _wordChecker.FoundWords.Clear(); CrosswordBoardMain.Instance().ResetBoard(); CrosswordBoardPlacedWord.Instance().ResetBoard(); MainController.SetupCrosswordPuzzle(CrosswordViewModel.Instance(), CrosswordBoardMain.Instance(), PlacementManager.Instance()); }
private void Awake() { Instance = this; Screen.sleepTimeout = SleepTimeout.NeverSleep; }
public TypedPlacementManager(TerrainController tc, System.Type t, PlacementManager d) : base(tc) { placementType = t; delegateManager = d; minDistance = 5.0f; }
public AlignNone(PlacementManager pMan) : base(pMan) { }
void Start() { pcm = FindObjectOfType <PlacementManager>(); }
protected override void Initialize() { base.Initialize(); IoCManager.InjectDependencies(this); Placement = (PlacementManager)IoCManager.Resolve <IPlacementManager>(); Placement.PlacementCanceled += OnPlacementCanceled; HideOnClose = true; Title = "Construction"; Visible = false; var hSplitContainer = new HSplitContainer(); // Left side var recipes = new VBoxContainer("Recipes") { CustomMinimumSize = new Vector2(150.0f, 0.0f) }; SearchBar = new LineEdit("Search") { PlaceHolder = "Search" }; RecipeList = new Tree("Tree") { SizeFlagsVertical = SizeFlags.FillExpand, HideRoot = true }; recipes.AddChild(SearchBar); recipes.AddChild(RecipeList); hSplitContainer.AddChild(recipes); // Right side var guide = new VBoxContainer("Guide"); var info = new HBoxContainer("Info"); InfoIcon = new TextureRect("TextureRect"); InfoLabel = new Label("Label") { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.ShrinkCenter }; info.AddChild(InfoIcon); info.AddChild(InfoLabel); guide.AddChild(info); var stepsLabel = new Label("Label") { SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter, Text = "Steps" }; guide.AddChild(stepsLabel); StepList = new ItemList("StepsList") { SizeFlagsVertical = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.None }; guide.AddChild(StepList); var buttonsContainer = new HBoxContainer("Buttons"); BuildButton = new Button("BuildButton") { SizeFlagsHorizontal = SizeFlags.FillExpand, TextAlign = Button.AlignMode.Center, Text = "Build!", Disabled = true, ToggleMode = false }; EraseButton = new Button("EraseButton") { TextAlign = Button.AlignMode.Center, Text = "Clear Ghosts", ToggleMode = true }; buttonsContainer.AddChild(BuildButton); buttonsContainer.AddChild(EraseButton); guide.AddChild(buttonsContainer); hSplitContainer.AddChild(guide); Contents.AddChild(hSplitContainer); BuildButton.OnPressed += OnBuildPressed; EraseButton.OnToggled += OnEraseToggled; SearchBar.OnTextChanged += OnTextEntered; RecipeList.OnItemSelected += OnItemSelected; PopulatePrototypeList(); PopulateTree(); }
public void ChangeList() { PlacementManager.BeginPlacement(GetCreationObject(), Place); }
public WallmountLight(PlacementManager pMan) : base(pMan) { }
private void Awake() { Current = this; }
public SnapgridCenter(PlacementManager pMan) : base(pMan) { }
public List <PlacementFace.PlacementDot> GetPlacementDots() { return(PlacementManager.GetPlacementDots(transform.position, transform.rotation, transform.lossyScale.x * width, transform.lossyScale.z * depth)); }
public PlaceNearby(PlacementManager pMan) : base(pMan) { }
public bool CanPlaceHere() { return(PlacementManager.CanPlace(GetPlacementDots())); }
public AlignSimilar(PlacementManager pMan) : base(pMan) { }
public PlaceFree(PlacementManager pMan) : base(pMan) { }
public AlignTileAny(PlacementManager pMan) : base(pMan) { }
public AlignWall(PlacementManager pMan) : base(pMan) { }
public AlignTileNonSolid(PlacementManager pMan) : base(pMan) { }
public AlignFree(PlacementManager pMan) : base(pMan) { }
public AlignFree(PlacementManager pMan) : base(pMan) { }
public AlignTileDense(PlacementManager pMan) : base(pMan) { }
public AlignWall(PlacementManager pMan) : base(pMan) { }
void Start() { cam = FindObjectOfType <Camera>(); placementManager = FindObjectOfType <PlacementManager>(); }