mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-23 10:05:14 +00:00
start adding object colour remapping
This commit is contained in:
parent
e85210511b
commit
2a2e8fc620
5 changed files with 93 additions and 216 deletions
|
@ -61591,7 +61591,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &4468064543835661468
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -96547,6 +96547,10 @@ MonoBehaviour:
|
|||
ItemHolder: {fileID: 8380209919518305174}
|
||||
Item: {fileID: 4158625219071088136}
|
||||
Joe: {fileID: 5897754239051819249}
|
||||
MappingMaterial: {fileID: 2100000, guid: 01a12550d4a6d8141bbbdf4ce2700eea, type: 2}
|
||||
BodyColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
HighlightColor: {r: 0.54901963, g: 0.54901963, b: 0.54901963, a: 1}
|
||||
ItemColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
Word: {fileID: 8471847813194768760}
|
||||
BGPlane: {fileID: 5423016352081307686}
|
||||
BGEffect: {fileID: 185016033042157469}
|
||||
|
@ -102304,7 +102308,7 @@ SpriteRenderer:
|
|||
m_Size: {x: 3.8888888, y: 3}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &7583125520394986553
|
||||
|
|
|
@ -8,7 +8,7 @@ Material:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: karateman_cellshader
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Shader: {fileID: 4800000, guid: ff54fed5718ccc543808dec1f266d1c8, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
|
@ -57,6 +57,7 @@ Material:
|
|||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
|
@ -70,9 +71,19 @@ Material:
|
|||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _AddColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ColorAlpha: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _ColorBravo: {r: 1, g: 0, b: 0, a: 1}
|
||||
- _ColorDelta: {r: 0.54901963, g: 0.54901963, b: 0.54901963, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
|
@ -269,6 +269,12 @@ TextureImporter:
|
|||
- first:
|
||||
213: -2636709571086610862
|
||||
second: karateman_torso_2
|
||||
- first:
|
||||
213: 3008790161821312096
|
||||
second: karateman_arm_1_part00
|
||||
- first:
|
||||
213: 7464444140288453835
|
||||
second: karateman_arm_1_part01
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
|
@ -1734,153 +1740,6 @@ TextureImporter:
|
|||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2503.44
|
||||
y: 1644.56
|
||||
width: 263.52002
|
||||
height: 341.6
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 17cf765748bbea3a0800000000000000
|
||||
internalID: -6652173421999817615
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2782.82
|
||||
y: 1649.4401
|
||||
width: 331.84
|
||||
height: 331.84
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: d55dd3018ec76f710800000000000000
|
||||
internalID: 1726704843289908573
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2893.84
|
||||
y: 1995.92
|
||||
width: 302.56
|
||||
height: 380.64
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: f9cb8bbef97ceda70800000000000000
|
||||
internalID: 8853733407125453983
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3206.1602
|
||||
y: 1997.14
|
||||
width: 341.6
|
||||
height: 379.42
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 835ae40a9411116f0800000000000000
|
||||
internalID: -715771857855404744
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_mark
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3557.52
|
||||
y: 1995.92
|
||||
width: 224.48001
|
||||
height: 380.64
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 60b58943bbaec0790800000000000000
|
||||
internalID: -7562411584499721466
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_hit
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2659.6
|
||||
y: 1217.56
|
||||
width: 370.88
|
||||
height: 334.28
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: d5f973741d07be330800000000000000
|
||||
internalID: 3741207959606632285
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_grr
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3047.56
|
||||
y: 1371.28
|
||||
width: 534.36
|
||||
height: 263.52002
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 7af9b1976ca2fb260800000000000000
|
||||
internalID: 7115452968192417703
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_tacobell
|
||||
rect:
|
||||
|
@ -1986,69 +1845,6 @@ TextureImporter:
|
|||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_main_77
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 4762.88
|
||||
y: 4919.04
|
||||
width: 39.04
|
||||
height: 39.04
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: b86f0adb8da4d4300800000000000000
|
||||
internalID: 237928650075338379
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_num_combo_jp
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3130.52
|
||||
y: 1650.66
|
||||
width: 455.06
|
||||
height: 329.4
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 7794aaa5edae6ecc0800000000000000
|
||||
internalID: -3681997404604053129
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_main_79
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2219.18
|
||||
y: 1556.7201
|
||||
width: 244
|
||||
height: 274.5
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 69c8a47bf2de53c10800000000000000
|
||||
internalID: 2032791596022008982
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_kick_prepare_1
|
||||
rect:
|
||||
|
@ -2238,6 +2034,48 @@ TextureImporter:
|
|||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_arm_1_part00
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3068
|
||||
y: 2080
|
||||
width: 410
|
||||
height: 288
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 064ac0ff5be51c920800000000000000
|
||||
internalID: 3008790161821312096
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: karateman_arm_1_part01
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 3536
|
||||
y: 2183
|
||||
width: 202
|
||||
height: 165
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: bcca3a3b568079760800000000000000
|
||||
internalID: 7464444140288453835
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
|
|
|
@ -35,6 +35,10 @@ namespace HeavenStudio.Games.Loaders
|
|||
{
|
||||
new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show")
|
||||
}),
|
||||
new GameAction("special camera", delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoSpecialCamera(e.beat, e.length, e.toggle); }, 8f, true, new List<Param>()
|
||||
{
|
||||
new Param("toggle", true, "Return Camera", "Camera zooms back in?"),
|
||||
}),
|
||||
new GameAction("prepare", delegate { var e = eventCaller.currentEntity; KarateMan.instance.Prepare(e.beat, e.length);}, 1f, true),
|
||||
new GameAction("set background effects", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3); }, 0.5f, true, new List<Param>()
|
||||
{
|
||||
|
@ -52,9 +56,11 @@ namespace HeavenStudio.Games.Loaders
|
|||
new Param("colorA", new Color(), "Custom Filter Color", "The filter color to use when color filter type is set to Custom"),
|
||||
new Param("colorB", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"),
|
||||
}),
|
||||
new GameAction("special camera", delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoSpecialCamera(e.beat, e.length, e.toggle); }, 8f, true, new List<Param>()
|
||||
new GameAction("set object colors", delegate { var e = eventCaller.currentEntity; KarateMan.instance.UpdateMaterialColour(e.colorA, e.colorB, e.colorC); }, 0.5f, true, new List<Param>()
|
||||
{
|
||||
new Param("toggle", true, "Return Camera", "Camera zooms back in?"),
|
||||
new Param("colorA", new Color(), "Joe Body Color", "The color to use for Karate Joe's body"),
|
||||
new Param("colorB", new Color(), "Joe Highlight Color", "The color to use for Karate Joe's highlights"),
|
||||
new Param("colorC", new Color(), "Item Color", "The color to use for the thrown items"),
|
||||
}),
|
||||
new GameAction("particle effects", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetParticleEffect(e.beat, e.type, e.valA, e.valB); }, 0.5f, false, new List<Param>()
|
||||
{
|
||||
|
@ -219,6 +225,12 @@ namespace HeavenStudio.Games
|
|||
public GameObject Item;
|
||||
public KarateManJoe Joe;
|
||||
|
||||
[Header("Colour Map")]
|
||||
public Material MappingMaterial;
|
||||
public Color BodyColor;
|
||||
public Color HighlightColor;
|
||||
public Color ItemColor;
|
||||
|
||||
[Header("Word")]
|
||||
public Animator Word;
|
||||
float wordClearTime = Single.MinValue;
|
||||
|
@ -278,6 +290,7 @@ namespace HeavenStudio.Games
|
|||
bgGradientRenderer = BGGradient.GetComponent<SpriteRenderer>();
|
||||
|
||||
SetBgAndShadowCol(0f, 0f, bgType, (int) currentShadowType, BackgroundColors[bgType], customShadowColour, (int)currentBgEffect);
|
||||
UpdateMaterialColour(BodyColor, HighlightColor, ItemColor);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -697,6 +710,15 @@ namespace HeavenStudio.Games
|
|||
customShadowColour = colour;
|
||||
}
|
||||
|
||||
public void UpdateMaterialColour(Color mainCol, Color highlightCol, Color objectCol)
|
||||
{
|
||||
MappingMaterial.SetColor("_ColorAlpha", mainCol);
|
||||
MappingMaterial.SetColor("_ColorBravo", new Color(1, 0, 0, 1));
|
||||
MappingMaterial.SetColor("_ColorDelta", highlightCol);
|
||||
ItemColor = objectCol;
|
||||
//TODO: joe fist colour when punching Straight with low flow
|
||||
}
|
||||
|
||||
public void SetParticleEffect(float beat, int type, float windStrength, float particleStrength)
|
||||
{
|
||||
ParticleSystem.EmissionModule emm;
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
FlyStatus status = FlyStatus.Fly;
|
||||
Color effectTint = Color.white;
|
||||
|
||||
Material[] renderMaterials;
|
||||
|
||||
public int comboId = -1;
|
||||
static int _lastCombo = -1;
|
||||
public static int LastCombo { get { return _lastCombo; } }
|
||||
|
|
Loading…
Reference in a new issue