Beispiel #1
0
        void OnDestroyBlock(object sender, DestrotyBlockOjectArgs e)
        {
            if (!linkedObjects.ContainsKey(e.Block))
            {
                return;
            }

            Destroy(linkedObjects[e.Block]);
        }
Beispiel #2
0
        public void DestroyBlock()
        {
            if (!HasBlock)
            {
                return;
            }

            var destroyBlockArgs = new DestrotyBlockOjectArgs(x, y, block);

            destroyedBlockEvent?.Invoke(this, destroyBlockArgs);

            block = null;

            ChangeDestroyBlockSprite();
            ChangeDestroyNeighborBlockSprite();
        }