同步
This commit is contained in:
195
Assets/ThemeBundles/Basic/Materials/Basic_Shape.mat
Normal file
195
Assets/ThemeBundles/Basic/Materials/Basic_Shape.mat
Normal file
@@ -0,0 +1,195 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Basic_Shape
|
||||
m_Shader: {fileID: 4800000, guid: ba1291d1b65e9624fb8aa363fdee9c46, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _BLENDMODE_ALPHA
|
||||
m_InvalidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _EMISSION_ON
|
||||
- _ENABLEEMISSION_ON
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
- _RECEIVE_SHADOWS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AlphaTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: af28470bd0e2e9543a6dfa9a1a4b348d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _texcoord:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendMode: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BlendOp: 0
|
||||
- _BumpScale: 1
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
- _CameraNearFadeDistance: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _ColorMode: 0
|
||||
- _Cull: 0
|
||||
- _CullMode: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DistortionBlend: 0.5
|
||||
- _DistortionEnabled: 0
|
||||
- _DistortionStrength: 1
|
||||
- _DistortionStrengthScaled: 0
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 0
|
||||
- _DstBlendRGB: 10
|
||||
- _Emission: 1
|
||||
- _EmissionEnabled: 0
|
||||
- _EnableEmission: 1
|
||||
- _EnableExternalAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _FlipbookBlending: 0
|
||||
- _FlipbookMode: 0
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossinessSource: 0
|
||||
- _GlossyReflections: 0
|
||||
- _LightingEnabled: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 3
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 0
|
||||
- _Shininess: 0
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessSource: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SoftParticlesEnabled: 0
|
||||
- _SoftParticlesFarFadeDistance: 1
|
||||
- _SoftParticlesNearFadeDistance: 0
|
||||
- _SpecSource: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _SrcBlendRGB: 5
|
||||
- _Surface: 0
|
||||
- _UseRedAsAlpha: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _EmissionColor: {r: 2, g: 2, b: 2, a: 1}
|
||||
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2523386628062252728
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
8
Assets/ThemeBundles/Basic/Materials/Basic_Shape.mat.meta
Normal file
8
Assets/ThemeBundles/Basic/Materials/Basic_Shape.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 720a10b6293e55b4da062c6c04944afd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -13,11 +13,11 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _BLENDMODE_ALPHA
|
||||
- _USEREDASALPHA_ON
|
||||
m_InvalidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
- _RECEIVE_SHADOWS_OFF
|
||||
- _USEREDASALPHA_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
@@ -57,7 +57,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fe0f51232d3c144e98a40dcef497dca2, type: 3}
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTexture:
|
||||
|
||||
@@ -13,11 +13,11 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _BLENDMODE_ALPHA
|
||||
- _USEREDASALPHA_ON
|
||||
m_InvalidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
- _RECEIVE_SHADOWS_OFF
|
||||
- _USEREDASALPHA_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
@@ -57,7 +57,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: fe0f51232d3c144e98a40dcef497dca2, type: 3}
|
||||
m_Texture: {fileID: 2800000, guid: 66241a67882e4a44ebce8a4cd73f0a24, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTexture:
|
||||
|
||||
140
Assets/ThemeBundles/Basic/Prefabs/Custom2DShape.prefab
Normal file
140
Assets/ThemeBundles/Basic/Prefabs/Custom2DShape.prefab
Normal file
@@ -0,0 +1,140 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5088079323518852183
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5538993855018306935}
|
||||
- component: {fileID: 5809771010128262868}
|
||||
- component: {fileID: 8026468966593356782}
|
||||
m_Layer: 0
|
||||
m_Name: Custom2DShape
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5538993855018306935
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5088079323518852183}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5809771010128262868
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5088079323518852183}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 720a10b6293e55b4da062c6c04944afd, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 9150d7e95bbb6664f9003b200188f544, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 2.62, y: 2.62}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!114 &8026468966593356782
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5088079323518852183}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: da3b1e646ff0d1f4f9fe88d5fd6b244f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Ichni.RhythmGame.ThemeBundles.Basic.Custom2DShape
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
ReferencedUnityObjects: []
|
||||
SerializedBytesString:
|
||||
Prefab: {fileID: 0}
|
||||
PrefabModificationsReferencedUnityObjects: []
|
||||
PrefabModifications: []
|
||||
SerializationNodes:
|
||||
- Name: elementGuid
|
||||
Entry: 2
|
||||
Data: 00000000000000000000000000000000
|
||||
- Name: submoduleList
|
||||
Entry: 7
|
||||
Data: 0|System.Collections.Generic.List`1[[Ichni.RhythmGame.SubmoduleBase,
|
||||
Assembly-CSharp]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
elementName:
|
||||
tags: []
|
||||
parentElement: {fileID: 0}
|
||||
childElementList: []
|
||||
themeBundleName:
|
||||
objectName:
|
||||
isStatic: 0
|
||||
spriteName: None
|
||||
spriteRenderer: {fileID: 5809771010128262868}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00643927510b85b41a9db40917709fe6
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName: basic
|
||||
assetBundleVariant:
|
||||
@@ -12,6 +12,7 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
public class Custom2DShape : EnvironmentObject
|
||||
{
|
||||
#region [暴露属性字段] Exposed Fields
|
||||
public string spriteThemeBundleName;
|
||||
public string spriteName = "None";
|
||||
public SpriteRenderer spriteRenderer;
|
||||
#endregion
|
||||
@@ -19,21 +20,18 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
#region [生命周期与工厂] Lifecycle & Factory
|
||||
public static Custom2DShape GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement,
|
||||
bool isStatic, string spriteName)
|
||||
bool isStatic, string spriteThemeBundleName, string spriteName)
|
||||
{
|
||||
// 通过 EnvironmentObject.GenerateElement 创建 GameObject 并获取组件
|
||||
Custom2DShape obj = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<Custom2DShape>();
|
||||
|
||||
obj.spriteThemeBundleName = spriteThemeBundleName;
|
||||
obj.spriteName = spriteName;
|
||||
return obj;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
public override void AfterInitialize()
|
||||
{
|
||||
if (spriteRenderer == null)
|
||||
spriteRenderer = GetComponentInChildren<SpriteRenderer>();
|
||||
|
||||
UpdateSprite();
|
||||
Refresh();
|
||||
}
|
||||
@@ -54,14 +52,24 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
if (spriteRenderer != null && !string.IsNullOrEmpty(spriteName) && spriteName != "None")
|
||||
{
|
||||
// 通过 ThemeBundleManager 获取 Sprite
|
||||
Sprite sp = ThemeBundleManager.instance.GetObject<Sprite>(themeBundleName, spriteName);
|
||||
Sprite sp = ThemeBundleManager.instance.GetObject<Sprite>(spriteThemeBundleName, spriteName);
|
||||
if (sp == null)
|
||||
{
|
||||
// 如果没有找到 Sprite,则从 Texture2D 列表中获取并动态创建 Sprite
|
||||
Texture2D tex = ThemeBundleManager.instance.GetObject<Texture2D>(spriteThemeBundleName, spriteName);
|
||||
if (tex != null)
|
||||
{
|
||||
sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f));
|
||||
}
|
||||
}
|
||||
|
||||
if (sp != null)
|
||||
{
|
||||
spriteRenderer.sprite = sp;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[Custom2DShape] 无法在包 '{themeBundleName}' 中找到 Sprite: {spriteName}");
|
||||
Debug.LogWarning($"[Custom2DShape] 无法在包 '{spriteThemeBundleName}' 中找到 Sprite/Texture: {spriteName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,6 +81,12 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
if (spriteRenderer != null)
|
||||
{
|
||||
spriteRenderer.color = colorSubmodule.currentBaseColor;
|
||||
if (colorSubmodule.emissionEnabled)
|
||||
{
|
||||
// 如果启用了发光,尝试设置发光颜色(需要对应的 Shader 支持)
|
||||
spriteRenderer.material.SetFloat("_EnableEmission", 1);
|
||||
spriteRenderer.material.SetColor("_EmissionColor", colorSubmodule.GetCurrentEmissionColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -87,21 +101,23 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
[System.Serializable]
|
||||
public class Custom2DShape_BM : EnvironmentObject_BM
|
||||
{
|
||||
public string spriteThemeBundleName;
|
||||
public string spriteName = "None";
|
||||
|
||||
public Custom2DShape_BM() { }
|
||||
|
||||
public Custom2DShape_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
string themeBundleName, string objectName, bool isStatic, string spriteName)
|
||||
string themeBundleName, string objectName, bool isStatic, string spriteThemeBundleName, string spriteName)
|
||||
: base(elementName, elementGuid, tags, parentElement, themeBundleName, objectName, isStatic)
|
||||
{
|
||||
this.spriteThemeBundleName = spriteThemeBundleName;
|
||||
this.spriteName = spriteName;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = Custom2DShape.GenerateElement(elementName, elementGuid, tags, false,
|
||||
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic, spriteName);
|
||||
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic, spriteThemeBundleName, spriteName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user