void OnCreateBlock(object sender, CreateBlcokObjectArgs e) { if (e.Block.BlockInfo.Light == null) { return; } var obj = Instantiate(e.Block.BlockInfo.Light, new Vector3(e.X, e.Y), Quaternion.identity); linkedObjects[e.Block] = obj; }
public void BuildBlock(BlockInfo blockInfo) { if (blockInfo == null) { return; } if (HasBlock) { return; } block = Block.Create(blockInfo); var createBlockArgs = new CreateBlcokObjectArgs(x, y, block); createdBlockEvent?.Invoke(this, createBlockArgs); ChangeCreateBlockSprite(); ChangeCreateNeighborBlockSprite(); }