Esempio n. 1
0
	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;


	}
Esempio n. 2
0
	public void SetCommandTiles(CommandTile[] coms){
		commandTiles = coms;
	}
Esempio n. 3
0
	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;
 }
Esempio n. 5
0
	public void SetTile(CommandTile newTile){
		newTile.transform.SetParent(this.transform, false);
		Debug.Log("set parent to slot");
		tile = newTile;
		tile.slot = this;
	}