예제 #1
0
        /*public override CraftingRecipe GetAdHocCraftingRecipe(SubsystemTerrain subsystemTerrain, string[] ingredients, float heatLevel)
         * {
         *      var recipe = Utils.GetAdHocCraftingRecipe(Index, subsystemTerrain, ingredients, heatLevel);
         *      if (recipe != null)
         *              for (int i = 0; i < ingredients.Length; i++)
         *                      if (!string.IsNullOrEmpty(ingredients[i]))
         *                      {
         *                              CraftingRecipesManager.DecodeIngredient(ingredients[i], out string craftingId, out int? data);
         *                              if (string.Equals(craftingId, CraftingId))
         *                                      recipe.ResultValue = Terrain.ReplaceData(Index, (Terrain.ExtractData(recipe.ResultValue) & 15) << 13 | (data ?? 0) & 15);
         *                      }
         *      return recipe;
         * }*/
        public override void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
        {
            var type = GetType(value);

            ItemBlock.DrawFlatBlock(primitivesRenderer, value, size, ref matrix, ItemBlock.Texture,
                                    (type == DrillType.DiamondDrill ? Color.Cyan : type == DrillType.SteelTubularis ? color = Color.Gray : color) * SubsystemPalette.GetColor(environmentData, Terrain.ExtractData(value) >> 13 & 15), false, environmentData);
        }
예제 #2
0
        public override void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
        {
            if ((Terrain.ExtractData(value) >> 10) != 0)
            {
                base.DrawBlock(primitivesRenderer, value, color, size, ref matrix, environmentData);
                return;
            }
            int   bulletType = (int)GetBulletType(Terrain.ExtractData(value));
            float size2      = (bulletType >= 0 && bulletType < m_sizes.Length) ? (size * m_sizes[bulletType]) : size;

            ItemBlock.DrawFlatBlock(primitivesRenderer, value, size2, ref matrix, ItemBlock.Texture, color, false, environmentData);
        }
예제 #3
0
파일: Materials.cs 프로젝트: Lixue9jiu/SCIE
 public override void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
 {
     ItemBlock.DrawFlatBlock(primitivesRenderer, value, size, ref matrix, ItemBlock.Texture, Color, false, environmentData);
 }