Skip to content

Commit

Permalink
Merge branch 'master' of github.com:BlueIceshard/neonmania
Browse files Browse the repository at this point in the history
# Conflicts:
#	Neonmania/Assets/Shaders/GlowingEdgeShader.ShaderGraph
  • Loading branch information
ShirleyNekoDev committed Jun 30, 2018
2 parents df116ba + 8ecb27b commit e5537a5
Show file tree
Hide file tree
Showing 14 changed files with 159 additions and 110 deletions.
2 changes: 1 addition & 1 deletion Neonmania/Assets/Materials/EnemyMaterial.mat
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- Vector1_30FACB43: 0
- Vector1_30FACB43: 1.5
- Vector1_57F42619: 2
- Vector1_80FF0A22: 1
- Vector1_A132DC88: 0.05
Expand Down
2 changes: 1 addition & 1 deletion Neonmania/Assets/Prefabs/Enemy.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ MonoBehaviour:
player: {fileID: 0}
speed: 1
checkFrequency: 1
timeToDie: 4
timeToDie: 1
--- !u!135 &135147735715590696
SphereCollider:
m_ObjectHideFlags: 1
Expand Down
2 changes: 1 addition & 1 deletion Neonmania/Assets/Prefabs/Projectile.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ SphereCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Radius: 5
m_Center: {x: 0, y: 0, z: 0}
142 changes: 55 additions & 87 deletions Neonmania/Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
- target: {fileID: 1240062629978812, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_Name
Expand Down Expand Up @@ -451,7 +451,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -481,6 +481,10 @@ Prefab:
propertyPath: m_LocalScale.x
value: 50
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.y
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
m_IsPrefabParent: 0
Expand All @@ -502,7 +506,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -530,7 +534,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.x
value: 50
value: 51
objectReference: {fileID: 0}
- target: {fileID: 1240062629978812, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_Name
Expand All @@ -544,6 +548,10 @@ Prefab:
propertyPath: m_LocalScale.z
value: 1.0000005
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.y
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
m_IsPrefabParent: 0
Expand All @@ -560,7 +568,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -590,6 +598,10 @@ Prefab:
propertyPath: m_Name
value: Wall (1)
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.y
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -664,6 +676,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e68807ba205749440827fc5e71ba7c09, type: 3}
m_Name:
m_EditorClassIdentifier:
color: 1
--- !u!1 &1148241113
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -673,6 +686,7 @@ GameObject:
m_Component:
- component: {fileID: 1148241115}
- component: {fileID: 1148241114}
- component: {fileID: 1148241116}
m_Layer: 5
m_Name: GUI
m_TagString: Untagged
Expand All @@ -688,7 +702,7 @@ Canvas:
m_GameObject: {fileID: 1148241113}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
Expand All @@ -708,18 +722,31 @@ RectTransform:
m_GameObject: {fileID: 1148241113}
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_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 2114914617}
- {fileID: 2140120284}
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1148241116
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1148241113}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32dddf2d5555548448633142a9bf1915, type: 3}
m_Name:
m_EditorClassIdentifier:
scoreField: {fileID: 2114914618}
waveField: {fileID: 2140120285}
--- !u!4 &1243357422 stripped
Transform:
m_PrefabParentObject: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752,
Expand Down Expand Up @@ -929,7 +956,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalPosition.z
Expand Down Expand Up @@ -957,7 +984,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.x
value: 50
value: 51
objectReference: {fileID: 0}
- target: {fileID: 1240062629978812, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_Name
Expand All @@ -967,6 +994,10 @@ Prefab:
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 4582049809608818, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
propertyPath: m_LocalScale.y
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f3d86897f293bfc4aa1fb70a3384a752, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -1057,71 +1088,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1476481431
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalPosition.y
value: 2.5
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
- target: {fileID: 114429256390817914, guid: da9c70ea3ed54464b955c8fdd666b19d,
type: 2}
propertyPath: properties
value:
objectReference: {fileID: 11400000, guid: 75edf39147a941649a58939134f2060b,
type: 2}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalScale.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalScale.y
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4060328548485418, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
propertyPath: m_LocalScale.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 114976053587055040, guid: da9c70ea3ed54464b955c8fdd666b19d,
type: 2}
propertyPath: player
value:
objectReference: {fileID: 1079610139}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1500499031
Prefab:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1292,7 +1258,8 @@ Prefab:
propertyPath: m_TagString
value: Player
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 114997818589997276, guid: d1d07de129d15a74390304540206fded, type: 2}
m_ParentPrefab: {fileID: 100100000, guid: d1d07de129d15a74390304540206fded, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1942816429
Expand Down Expand Up @@ -1338,6 +1305,7 @@ MonoBehaviour:
enemy: {fileID: 1683257992604568, guid: da9c70ea3ed54464b955c8fdd666b19d, type: 2}
spawnPlane: {fileID: 1323457083}
player: {fileID: 1079610139}
gUIController: {fileID: 1148241116}
minionTypes:
- {fileID: 11400000, guid: d37f1f9f417523947adef0c72bd77ea3, type: 2}
- {fileID: 11400000, guid: 75edf39147a941649a58939134f2060b, type: 2}
Expand Down Expand Up @@ -1378,7 +1346,7 @@ Transform:
- {fileID: 14614190}
- {fileID: 670339953}
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2114914616
GameObject:
Expand Down Expand Up @@ -1410,11 +1378,11 @@ RectTransform:
m_Father: {fileID: 1148241115}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 1, y: 1}
--- !u!114 &2114914618
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1484,11 +1452,11 @@ RectTransform:
m_Father: {fileID: 1148241115}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2140120285
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Neonmania/Assets/Scripts/CMYColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ public static readonly CMYColor
}

public Color AsHDRColor(float glow) {
return new Vector4(1.0f -this.c, 1.0f - this.m, 1.0f - this.y, glow);
return new Vector4(1.0f - this.c, 1.0f - this.m, 1.0f - this.y, glow);
}
}
8 changes: 7 additions & 1 deletion Neonmania/Assets/Scripts/EnemyColorChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ public class EnemyColorChanger : MonoBehaviour {

private void OnTriggerEnter(Collider collider) {
if (collider.CompareTag("PlayerProjectile")) {

/* if(collider.GetComponent<ProjectileController>().doNotAssignManually != null)
collider.GetComponent<ProjectileController>().doNotAssignManually = this.gameObject; */

CMYColor hitColor = collider.GetComponent<ProjectileController>().color;
currentColor += enemy.weakness * hitColor;

if (currentColor.IsBlack()) {
killHandler.OnDeath();
}

Destroy(collider.gameObject);
}
}

Expand All @@ -62,6 +68,6 @@ public class EnemyColorChanger : MonoBehaviour {
}

private void ApplyColor(CMYColor color) {
GetComponent<Renderer>().material.SetColor(Shader.PropertyToID("Color_53254DB6"), color.AsHDRColor(1f));
GetComponent<Renderer>().material.SetColor(Shader.PropertyToID("Color_53254DB6"), color.AsColor());
}
}
Loading

0 comments on commit e5537a5

Please sign in to comment.