public void RemoveTile(){ Debug.Log("tile removed from " + this); if(tile.slot == this){ tile.slot = null; // the tile is being removed because it was dragged out and not because they were being rearranged, functionZone should remove it if(Tile.tileBeingDragged == tile){ functionZone.RemoveCommand(slotIndex); } } else{ Debug.Log("tile's slot is not this, it is " + tile.slot); } //tile.transform.SetParent(Tile.FindInParents<Canvas>(gameObject).transform); tile = null; }
public void SetCommandTiles(CommandTile[] coms){ commandTiles = coms; }
public void Init(CommandTile tilePrefab, int arg){ this.tilePrefab = tilePrefab; CommandTile tile = GameObject.Instantiate(tilePrefab); tile.Init(arg); tile.transform.SetParent (this.transform); }
public CommandTileInterface(CommandTile tile, CommandTileEntity tileEntity, KhaiosPlayer caller) { this.tile = tile; this.tileEntity = tileEntity; this.caller = caller; }
public void SetTile(CommandTile newTile){ newTile.transform.SetParent(this.transform, false); Debug.Log("set parent to slot"); tile = newTile; tile.slot = this; }