コード例 #1
0
        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;
        }
コード例 #2
0
        public bool TryReturnToPool(Block block)
        {
            if (block.TryReset ())
            {
                m_explosionPooling.ExecuteParticleFromPool (block.transform.position);

                m_blockPooling.ReturnBlockToPool (block);

                return true;
            }

            return false;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
 public override void ExecuteBehaviour(Block block)
 {
     GridManager.RemoveByColumnAboveTheRow (block);
 }
コード例 #5
0
 public abstract void Setup(Block block, params SpriteRenderer[] renderers);
コード例 #6
0
 public abstract void ExecuteBehaviour(Block block);
コード例 #7
0
 public override void ExecuteBehaviour(Block block)
 {
     GridManager.RemoveByColor (block);
 }
コード例 #8
0
 public override void ExecuteBehaviour(Block block)
 {
     GridManager.RemoveByNeighborhood(block);
 }
コード例 #9
0
 public override void Setup(Block block, params SpriteRenderer[] renderers)
 {
     foreach (var item in renderers) item.enabled = false;
 }
コード例 #10
0
        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;
        }
コード例 #11
0
 public override void ExecuteBehaviour(Block block)
 {
 }
コード例 #12
0
 void Awake()
 {
     m_parentBlock = GetComponentInParent<Block> ();
 }
コード例 #13
0
 public void RemoveNeighbors(Block neighbor)
 {
     m_neighbors.Remove(neighbor);
 }
コード例 #14
0
 public void AddNeighbors(Block neighbor)
 {
     if (!m_neighbors.Contains(neighbor)) m_neighbors.Add (neighbor);
 }