You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PlumberUltimateAds/Assets/2DxFX/Scripts/2dxfx_AL/_2dxFX_AL_BlackHole.cs

490 lines
19 KiB
C#

Squashed commit of the following: commit 761fe0f0e39341baeea362d1a24b85307c6533bf Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 17:30:04 2024 +0500 Fixed some spash issues commit a29c5d792ee1e70828ca21d11b1d0e8b57194d3b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 16:57:44 2024 +0500 Fixed Splash issue commit 4000ab25110d0593dfe5ad5eea81a4109a744464 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 16:00:08 2024 +0500 fixed spalsh issue commit df377a68259ee183783ce1d898258a26e9f7e6de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 00:59:51 2024 +0500 Reapply "Fixed Splash Animation" This reverts commit b13733598e066c087cc1835f0e566d9fc6e4ebb3. commit b13733598e066c087cc1835f0e566d9fc6e4ebb3 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 00:39:51 2024 +0500 Revert "Fixed Splash Animation" This reverts commit 7ca6548075765db1bc2f62015ffec7fecb6235de. commit 7ca6548075765db1bc2f62015ffec7fecb6235de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 16 17:19:40 2024 +0500 Fixed Splash Animation commit ec93b630739611fe012cd30c081421d4f63f3395 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 16 16:52:15 2024 +0500 Added New Pipes commit 47925d7b4d767d72f41a8e24b2728645a6444771 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:08:10 2024 +0500 Some indentation commit 0c342ac10c38154817b2e11f05821b0f1a1ea674 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:07:14 2024 +0500 Increased Level Cell Size commit f3a7e3ed5a1ae97a6aae36cd9e1c87f206a1488c Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:02:58 2024 +0500 Revert "Increased Cell size" This reverts commit 6e4c1672ba8e63276cfe45afed9af56abb7668de. commit 6e4c1672ba8e63276cfe45afed9af56abb7668de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 17:48:28 2024 +0500 Increased Cell size commit dce666657f57307688c7633084330aec07052f78 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 17:36:13 2024 +0500 Added Ranked Up Screen commit d4883314781598c9a3444930ac0a956b1b088890 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 14:13:54 2024 +0500 Added new Level Complete Screen commit 1ef6d7cf34773c89b12723f99e26b6aa6043745a Author: TG9six <totalgamer.tg.x@gmail.com> Date: Mon Oct 14 12:04:04 2024 +0400 UI improved Level selection change anchoring improved commit ea8f9899e856e021978159125a8e782bd0cf3a53 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 21:05:40 2024 +0500 All UI Done commit d656fb09a601bc57f1e6d004b83256ce26e59d97 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 19:15:22 2024 +0500 Added Level Screen commit f131e38a6b7ea830ae6816df16d148bbf3847dcd Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 17:13:26 2024 +0500 Gameplay UI Done commit a695895c90522a7208abfa9edc07040021362799 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 16:36:09 2024 +0500 Added all gameplay UI commit ab259bf005c7dc1bf01cc334da9b5dd701818496 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 11:21:47 2024 +0500 Added Level Type Selection Screen commit 8cebd78cfeec4fea53a38687d8c244c8ff08f15b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 21:33:27 2024 +0500 Added RateUs commit 901e44afafb7b0bca1209df744d9a0be1012cd0b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 20:56:50 2024 +0500 Before addiung unity figma bridge commit bdc01bcb186e1714d5b7efa061418e979b926312 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 19:36:39 2024 +0500 Added Settings menu commit 85b53482054a0f4831dc62ca805dbc8a96e474e5 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 19:13:39 2024 +0500 Added Main Menu Screen commit a80c82c82f91563ea3a06a5d7cb4219dc9520b14 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 17:26:31 2024 +0500 Added new main menu UI commit 833a599da1496f33d46bd2f32457ad2b16f6bd9d Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 13:22:52 2024 +0500 Added MainMenu Animation
6 days ago
//////////////////////////////////////////////
/// 2DxFX - 2D SPRITE FX - by VETASOFT 2018 //
//////////////////////////////////////////////
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif
[ExecuteInEditMode]
[AddComponentMenu("2DxFX/Advanced Lightning/Black Hole")]
[System.Serializable]
public class _2dxFX_AL_BlackHole : MonoBehaviour
{
[HideInInspector] public Material ForceMaterial;
// Advanced Lightning
[HideInInspector] public bool ActiveChange = true;
[HideInInspector] public bool AddShadow = true;
[HideInInspector] public bool ReceivedShadow = false;
[HideInInspector] public int BlendMode = 0;
private string shader = "2DxFX/AL/BlackHole";
[HideInInspector] [Range(0, 1)] public float _Alpha = 1f;
[HideInInspector] public Color _Color = new Color(1f, 1f, 1f, 1f);
[HideInInspector] [Range(-1, 1)] public float Distortion = 1.6f;
[HideInInspector] [Range(0, 0.5f)] public float _Hole = 0;
[HideInInspector] [Range(-10, 10)] public float Speed = 4;
[HideInInspector] public int ShaderChange = 0;
Material tempMaterial;
Material defaultMaterial;
Image CanvasImage;
SpriteRenderer CanvasSpriteRenderer;[HideInInspector] public bool ActiveUpdate = true;
void Awake()
{
if (this.gameObject.GetComponent<Image>() != null) CanvasImage = this.gameObject.GetComponent<Image>();
if (this.gameObject.GetComponent<SpriteRenderer>() != null) CanvasSpriteRenderer = this.gameObject.GetComponent<SpriteRenderer>();
}
void Start()
{
ShaderChange = 0;
XUpdate();
}
public void CallUpdate()
{
XUpdate();
}
void Update()
{
if (ActiveUpdate) XUpdate();
}
void XUpdate()
{
if (CanvasImage == null)
{
if (this.gameObject.GetComponent<Image>() != null) CanvasImage = this.gameObject.GetComponent<Image>();
}
if (CanvasSpriteRenderer == null)
{
if (this.gameObject.GetComponent<SpriteRenderer>() != null) CanvasSpriteRenderer = this.gameObject.GetComponent<SpriteRenderer>();
}
if ((ShaderChange == 0) && (ForceMaterial != null))
{
ShaderChange = 1;
if (tempMaterial != null) DestroyImmediate(tempMaterial);
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = ForceMaterial;
}
else if (CanvasImage != null)
{
CanvasImage.material = ForceMaterial;
}
ForceMaterial.hideFlags = HideFlags.None;
ForceMaterial.shader = Shader.Find(shader);
}
if ((ForceMaterial == null) && (ShaderChange == 1))
{
if (tempMaterial != null) DestroyImmediate(tempMaterial);
tempMaterial = new Material(Shader.Find(shader));
tempMaterial.hideFlags = HideFlags.None;
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = tempMaterial;
}
else if (CanvasImage != null)
{
CanvasImage.material = tempMaterial;
}
ShaderChange = 0;
}
#if UNITY_EDITOR
string dfname = "";
if (CanvasSpriteRenderer != null) dfname = CanvasSpriteRenderer.sharedMaterial.shader.name;
if (CanvasImage != null)
{
Image img = CanvasImage;
if (img.material == null) dfname = "Sprites/Default";
}
if (dfname == "Sprites/Default")
{
ForceMaterial.shader = Shader.Find(shader);
ForceMaterial.hideFlags = HideFlags.None;
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = ForceMaterial;
}
else if (CanvasImage != null)
{
Image img = CanvasImage;
if (img.material == null)
{
CanvasImage.material = ForceMaterial;
}
}
}
#endif
if (ActiveChange)
{
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial.SetFloat("_Alpha", 1 - _Alpha);
if (_2DxFX.ActiveShadow && AddShadow)
{
CanvasSpriteRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
if (ReceivedShadow)
{
CanvasSpriteRenderer.receiveShadows = true;
CanvasSpriteRenderer.sharedMaterial.renderQueue = 2450;
CanvasSpriteRenderer.sharedMaterial.SetInt("_Z", 1);
}
else
{
CanvasSpriteRenderer.receiveShadows = false;
CanvasSpriteRenderer.sharedMaterial.renderQueue = 3000;
CanvasSpriteRenderer.sharedMaterial.SetInt("_Z", 0);
}
}
else
{
CanvasSpriteRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
CanvasSpriteRenderer.receiveShadows = false;
CanvasSpriteRenderer.sharedMaterial.renderQueue = 3000;
CanvasSpriteRenderer.sharedMaterial.SetInt("_Z", 0);
}
if (BlendMode == 0) // LetterEntered
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Add);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
}
if (BlendMode == 1) // Additive
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Add);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.One);
}
if (BlendMode == 2) // Darken
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.ReverseSubtract);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.DstColor);
}
if (BlendMode == 3) // Lighten
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Max);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.One);
}
if (BlendMode == 4) // Linear Burn
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.ReverseSubtract);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.One);
}
if (BlendMode == 5) // Linear Dodge
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Max);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
}
if (BlendMode == 6) // Multiply
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Add);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.DstColor);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
}
if (BlendMode == 7) // Soft Aditive
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.Add);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusDstColor);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.One);
}
if (BlendMode == 8) // 2x Multiplicative
{
CanvasSpriteRenderer.sharedMaterial.SetInt("_BlendOp", (int)UnityEngine.Rendering.BlendOp.ReverseSubtract);
CanvasSpriteRenderer.sharedMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.DstAlpha);
CanvasSpriteRenderer.sharedMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.DstColor);
}
CanvasSpriteRenderer.sharedMaterial.SetFloat("_Distortion", Distortion);
CanvasSpriteRenderer.sharedMaterial.SetFloat("_Hole", _Hole);
CanvasSpriteRenderer.sharedMaterial.SetFloat("_Speed", Speed);
CanvasSpriteRenderer.sharedMaterial.SetColor("_ColorX", _Color);
}
else if (CanvasImage != null)
{
CanvasImage.material.SetFloat("_Alpha", 1 - _Alpha);
CanvasImage.material.SetFloat("_Distortion", Distortion);
CanvasImage.material.SetFloat("_Hole", _Hole);
CanvasImage.material.SetFloat("_Speed", Speed);
CanvasImage.material.SetColor("_ColorX", _Color);
}
}
}
void OnDestroy()
{
if ((Application.isPlaying == false) && (Application.isEditor == true))
{
if (tempMaterial != null) DestroyImmediate(tempMaterial);
if (gameObject.activeSelf && defaultMaterial != null)
{
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = defaultMaterial;
CanvasSpriteRenderer.sharedMaterial.hideFlags = HideFlags.None;
}
else if (CanvasImage != null)
{
CanvasImage.material = defaultMaterial;
CanvasImage.material.hideFlags = HideFlags.None;
}
}
}
}
void OnDisable()
{
if (gameObject.activeSelf && defaultMaterial != null)
{
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = defaultMaterial;
CanvasSpriteRenderer.sharedMaterial.hideFlags = HideFlags.None;
}
else if (CanvasImage != null)
{
CanvasImage.material = defaultMaterial;
CanvasImage.material.hideFlags = HideFlags.None;
}
}
}
void OnEnable()
{
if (defaultMaterial == null)
{
defaultMaterial = new Material(Shader.Find("Sprites/Default"));
}
if (ForceMaterial == null)
{
ActiveChange = true;
tempMaterial = new Material(Shader.Find(shader));
tempMaterial.hideFlags = HideFlags.None;
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = tempMaterial;
}
else if (CanvasImage != null)
{
CanvasImage.material = tempMaterial;
}
}
else
{
ForceMaterial.shader = Shader.Find(shader);
ForceMaterial.hideFlags = HideFlags.None;
if (CanvasSpriteRenderer != null)
{
CanvasSpriteRenderer.sharedMaterial = ForceMaterial;
}
else if (CanvasImage != null)
{
CanvasImage.material = ForceMaterial;
}
}
}
}
#if UNITY_EDITOR
[CustomEditor(typeof(_2dxFX_AL_BlackHole)), CanEditMultipleObjects]
public class _2dxFX_AL_BlackHole_Editor : Editor
{
private SerializedObject m_object;
public void OnEnable()
{
m_object = new SerializedObject(targets);
}
public override void OnInspectorGUI()
{
m_object.Update();
DrawDefaultInspector();
_2dxFX_AL_BlackHole _2dxScript = (_2dxFX_AL_BlackHole)target;
Texture2D icon = Resources.Load("2dxfxinspector-al") as Texture2D;
if (icon)
{
Rect r;
float ih = icon.height;
float iw = icon.width;
float result = ih / iw;
float w = Screen.width;
result = result * w;
r = GUILayoutUtility.GetRect(ih, result);
EditorGUI.DrawTextureTransparent(r, icon);
}
EditorGUILayout.LabelField("Advanced Lightning may work on mobile high-end devices and may be slower than the Standard 2DxFX effects due to is lightning system. Use it only if you need it.", EditorStyles.helpBox);
EditorGUILayout.PropertyField(m_object.FindProperty("AddShadow"), new GUIContent("Add Shadow", "Use a unique material, reduce drastically the use of draw call"));
if (_2dxScript.AddShadow)
{
EditorGUILayout.PropertyField(m_object.FindProperty("ReceivedShadow"), new GUIContent("Received Shadow : No Transparency and Use Z Buffering instead of Sprite Order Layers", "Received Shadow, No Transparency and Use Z Buffering instead of Sprite Order Layers"));
if (_2dxScript.ReceivedShadow)
{
EditorGUILayout.LabelField("Note 1: Blend Fusion work but without transparency\n", EditorStyles.helpBox);
}
}
// Mode Blend
string BlendMethode = "LetterEntered";
if (_2dxScript.BlendMode == 0) BlendMethode = "LetterEntered";
if (_2dxScript.BlendMode == 1) BlendMethode = "Additive";
if (_2dxScript.BlendMode == 2) BlendMethode = "Darken";
if (_2dxScript.BlendMode == 3) BlendMethode = "Lighten";
if (_2dxScript.BlendMode == 4) BlendMethode = "Linear Burn";
if (_2dxScript.BlendMode == 5) BlendMethode = "Linear Dodge";
if (_2dxScript.BlendMode == 6) BlendMethode = "Multiply";
if (_2dxScript.BlendMode == 7) BlendMethode = "Soft Aditive";
if (_2dxScript.BlendMode == 8) BlendMethode = "2x Multiplicative";
EditorGUILayout.PropertyField(m_object.FindProperty("ActiveUpdate"), new GUIContent("Active Update", "Active Update, for animation / Animator only")); EditorGUILayout.PropertyField(m_object.FindProperty("ForceMaterial"), new GUIContent("Shared Material", "Use a unique material, reduce drastically the use of draw call"));
if (_2dxScript.ForceMaterial == null)
{
_2dxScript.ActiveChange = true;
}
else
{
if (GUILayout.Button("Remove Shared Material"))
{
_2dxScript.ForceMaterial = null;
_2dxScript.ShaderChange = 1;
_2dxScript.ActiveChange = true;
_2dxScript.CallUpdate();
}
EditorGUILayout.PropertyField(m_object.FindProperty("ActiveChange"), new GUIContent("Change Material Property", "Change The Material Property"));
}
if (_2dxScript.ActiveChange)
{
EditorGUILayout.BeginVertical("Box");
Texture2D icone = Resources.Load("2dxfx-icon-distortion") as Texture2D;
EditorGUILayout.PropertyField(m_object.FindProperty("Distortion"), new GUIContent("Distortion", icone, "Change the distortion size"));
icone = Resources.Load("2dxfx-icon-size") as Texture2D;
EditorGUILayout.PropertyField(m_object.FindProperty("_Hole"), new GUIContent("Hole", icone, "Change the size of the hole"));
icone = Resources.Load("2dxfx-icon-time") as Texture2D;
EditorGUILayout.PropertyField(m_object.FindProperty("Speed"), new GUIContent("Speed", icone, "Change the speed of the hole"));
icone = Resources.Load("2dxfx-icon-color") as Texture2D;
EditorGUILayout.PropertyField(m_object.FindProperty("_Color"), new GUIContent("Color", icone, "Change the color of the black hole"));
EditorGUILayout.BeginVertical("Box");
icone = Resources.Load("2dxfx-icon-fade") as Texture2D;
EditorGUILayout.PropertyField(m_object.FindProperty("_Alpha"), new GUIContent("Fading", icone, "Fade from nothing to showing"));
EditorGUILayout.EndVertical();
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical("Box");
EditorGUILayout.LabelField("Change Blend Fusion = " + BlendMethode, EditorStyles.whiteLargeLabel);
if (_2dxScript.ReceivedShadow)
{
EditorGUILayout.LabelField("Note: Blend Fusion is not working correctly with Received Shadow", EditorStyles.helpBox);
}
EditorGUILayout.BeginHorizontal("Box");
if (GUILayout.Button("LetterEntered", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 0;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Additive", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 1;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Darken", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 2;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Lighten", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 3;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Linear Burn", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 4;
_2dxScript.CallUpdate();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal("Box");
if (GUILayout.Button("Linear Dodge", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 5;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Multiply", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 6;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("Soft Aditive", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 7;
_2dxScript.CallUpdate();
}
if (GUILayout.Button("2x Multiplicative", EditorStyles.toolbarButton))
{
_2dxScript.BlendMode = 8;
_2dxScript.CallUpdate();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
m_object.ApplyModifiedProperties();
}
}
#endif