Ejemplo n.º 1
0
        public void SetPlaceableBlock(HalfBlock.HalfBlock block)
        {
            this.HalfBlock         = block;
            this.HasPlaceableBlock = true;

            Color color = HalfBlock.CalculateUnityColor();

            networkView.RPC("SetBlockType", NetworkPlayer, 1, ColorModel.ConvertToVector3(color));
            CubeFinger.Renderer.SetColor(color);
        }
Ejemplo n.º 2
0
        public void GiveNewInventoryBlock()
        {
            HalfBlock = new HalfBlock.HalfBlock(getNewHalfBlockColor());
            Vector3 color = ColorModel.ConvertToVector3(HalfBlock.CalculateUnityColor());

            CubeFinger.Renderer.SetColor(HalfBlock.CalculateUnityColor());
            if (HalfBlock.wrappedObject.color.isSecondaryColor)
            {
                HasPlaceableBlock = false;
            }
            else
            {
                HasPlaceableBlock = Random.value < FULL_BLOCK_CHANCE;
            }
            networkView.RPC("SetBlockType", NetworkPlayer, HasPlaceableBlock ? 1 : 0, color);
        }