mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-23 18:15:13 +00:00
Added custom shadow colours
And specific shadow colours for preset background types
This commit is contained in:
parent
e3a5e55d54
commit
c920261ac7
4 changed files with 48 additions and 13 deletions
|
@ -17775,6 +17775,13 @@ MonoBehaviour:
|
|||
- {r: 1, g: 0.58431375, b: 0.3137255, a: 1}
|
||||
- {r: 0.9607844, g: 0.7725491, b: 0.78823537, a: 1}
|
||||
- {r: 0, g: 0, b: 0, a: 0}
|
||||
ShadowColors:
|
||||
- {r: 0.84313726, g: 0.52156866, b: 0.23137255, a: 1}
|
||||
- {r: 0.88235295, g: 0.41960785, b: 0.5294118, a: 1}
|
||||
- {r: 0.3137255, g: 0.31764707, b: 0.40784317, a: 1}
|
||||
- {r: 0, g: 0, b: 0, a: 1}
|
||||
- {r: 0.454902, g: 0.19607845, b: 0.121568635, a: 1}
|
||||
- {r: 0.654902, g: 0.4156863, b: 0.45882356, a: 1}
|
||||
Pot: {fileID: 7248900332380919981}
|
||||
Bomb: {fileID: 1878496493894552565}
|
||||
KarateJoe: {fileID: 7248900332013002443}
|
||||
|
@ -17799,7 +17806,10 @@ MonoBehaviour:
|
|||
- {fileID: 21300000, guid: f05694d1ff974fe4387e487d025edede, type: 3}
|
||||
BGSprite: {fileID: 7248900333330862853}
|
||||
BGFXSprite: {fileID: 7037067448840752386}
|
||||
BGType: 0
|
||||
BGColor: {r: 0.94117653, g: 0.91372555, b: 0.43921572, a: 1}
|
||||
Shadow: 0
|
||||
ShadowColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
comboRef: {fileID: 1174851578296134715}
|
||||
HIT3Ref: {fileID: 6398113137460299953}
|
||||
Numbers:
|
||||
|
@ -17859,7 +17869,7 @@ Transform:
|
|||
m_GameObject: {fileID: 7248900333330862855}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 600, y: 600, z: 1}
|
||||
m_LocalScale: {x: 300, y: 300, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7248900332961029735}
|
||||
m_RootOrder: 0
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace RhythmHeavenMania
|
|||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float valB;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float valC;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type2;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public EasingFunction.Ease ease;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorA;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorB;
|
||||
|
|
|
@ -27,8 +27,15 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
Custom
|
||||
}
|
||||
|
||||
public enum ShadowType
|
||||
{
|
||||
Tinted,
|
||||
Custom
|
||||
}
|
||||
|
||||
public Color[] LightBulbColors;
|
||||
public Color[] BackgroundColors;
|
||||
public Color[] ShadowColors;
|
||||
public static Color ShadowBlendColor = new Color(195f / 255f, 48f / 255f, 2f / 255f);
|
||||
|
||||
const float hitVoiceOffset = 0.042f;
|
||||
|
@ -47,8 +54,12 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
public SpriteRenderer BGSprite;
|
||||
public SpriteRenderer BGFXSprite;
|
||||
|
||||
public BackgroundType BGType = BackgroundType.Yellow;
|
||||
public Color BGColor;
|
||||
|
||||
public ShadowType Shadow = ShadowType.Tinted;
|
||||
public Color ShadowColor = Color.black;
|
||||
|
||||
private float newBeat;
|
||||
|
||||
public GameEvent bop = new GameEvent();
|
||||
|
@ -72,13 +83,15 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
BGType = 0;
|
||||
BGColor = BackgroundColors[0];
|
||||
Shadow = 0;
|
||||
}
|
||||
|
||||
public override void OnGameSwitch()
|
||||
{
|
||||
base.OnGameSwitch();
|
||||
SetBackgroundColor(BGColor);
|
||||
SetBackgroundColor((int)BGType, (int)Shadow, BGColor, ShadowColor);
|
||||
}
|
||||
|
||||
public void Combo(float beat)
|
||||
|
@ -257,11 +270,13 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
BGFXSprite.enabled = false;
|
||||
}
|
||||
|
||||
public void SetBackgroundColor(Color color)
|
||||
public void SetBackgroundColor(int type, int shadowType, Color backgroundColor, Color shadowColor)
|
||||
{
|
||||
Debug.Log("THE COLOR IS " + color.ToString());
|
||||
BGColor = color;
|
||||
BGSprite.color = color;
|
||||
BGType = (BackgroundType)type;
|
||||
BGColor = backgroundColor;
|
||||
BGSprite.color = backgroundColor;
|
||||
Shadow = (ShadowType)shadowType;
|
||||
ShadowColor = shadowColor;
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length)
|
||||
|
@ -312,9 +327,16 @@ namespace RhythmHeavenMania.Games.KarateMan
|
|||
|
||||
public Color GetShadowColor()
|
||||
{
|
||||
var col = Color.LerpUnclamped(KarateMan.instance.BGColor, KarateMan.ShadowBlendColor, 0.45f);
|
||||
|
||||
return col;
|
||||
if(Shadow == ShadowType.Custom)
|
||||
{
|
||||
return ShadowColor;
|
||||
}
|
||||
else if(BGType < BackgroundType.Custom)
|
||||
{
|
||||
return ShadowColors[(int)BGType];
|
||||
}
|
||||
|
||||
return Color.LerpUnclamped(BGColor, ShadowBlendColor, 0.45f);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -252,13 +252,15 @@ namespace RhythmHeavenMania
|
|||
new GameAction("set background color", delegate {
|
||||
var e = eventCaller.currentEntity;
|
||||
var c = KarateMan.instance.BackgroundColors[e.type];
|
||||
Debug.Log("TYPE=" + e.type.ToString() + ", SHADOW=" + e.type2.ToString());
|
||||
if(e.type == (int)KarateMan.BackgroundType.Custom) c = e.colorA;
|
||||
Debug.Log("type - " + e.type.ToString());
|
||||
KarateMan.instance.SetBackgroundColor(c);
|
||||
KarateMan.instance.SetBackgroundColor(e.type, e.type2, c, e.colorB);
|
||||
}, 1f, false, new List<Param>()
|
||||
{
|
||||
new Param("type", KarateMan.BackgroundType.Yellow, "Type"),
|
||||
new Param("colorA", new Color(), "Custom Color")
|
||||
new Param("type", KarateMan.BackgroundType.Yellow, "Background Type"),
|
||||
new Param("type2", KarateMan.ShadowType.Tinted, "Shadow Type"),
|
||||
new Param("colorA", new Color(), "Custom Background Color"),
|
||||
new Param("colorB", new Color(), "Custom Shadow Color")
|
||||
}),
|
||||
new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 6); }, 2),
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue