public override void Setup(Block block, params SpriteRenderer[] renderers) { block.SetVisibility(false); foreach (var item in renderers) item.enabled = false; renderers [0].enabled = true; renderers [0].color = block.CurrentColor; }
public bool TryReturnToPool(Block block) { if (block.TryReset ()) { m_explosionPooling.ExecuteParticleFromPool (block.transform.position); m_blockPooling.ReturnBlockToPool (block); return true; } return false; }
private Block[] GetSpawnedBlocks() { var blocks = new Block[GridManager.Columns]; for (int i = 0; i < blocks.Length; i++) { var position = new Vector2(GridManager.BlockFirstPosition.x + i * GridManager.BlockSize.x, GridManager.BlockFirstPosition.y - GridManager.BlockSize.y - .1f); blocks[i] = CreateBlock(i, position, GridManager.WallTransform, false); blocks[i].gameObject.layer = GlobalVariables.SpawnedLayer; blocks[i].SetVisibility(false); blocks[i].SetAlpha(0.25f); } return blocks; }
public override void ExecuteBehaviour(Block block) { GridManager.RemoveByColumnAboveTheRow (block); }
public abstract void Setup(Block block, params SpriteRenderer[] renderers);
public abstract void ExecuteBehaviour(Block block);
public override void ExecuteBehaviour(Block block) { GridManager.RemoveByColor (block); }
public override void ExecuteBehaviour(Block block) { GridManager.RemoveByNeighborhood(block); }
public override void Setup(Block block, params SpriteRenderer[] renderers) { foreach (var item in renderers) item.enabled = false; }
public override void Setup(Block block, params SpriteRenderer[] renderers) { foreach (var item in renderers) item.enabled = false; renderers [2].enabled = true; renderers [2].color = Color.white; }
public override void ExecuteBehaviour(Block block) { }
void Awake() { m_parentBlock = GetComponentInParent<Block> (); }
public void RemoveNeighbors(Block neighbor) { m_neighbors.Remove(neighbor); }
public void AddNeighbors(Block neighbor) { if (!m_neighbors.Contains(neighbor)) m_neighbors.Add (neighbor); }