Commit ed784486 authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

Merge branch 'mimemime' into UIMenus

parents ca26e730 d1afcec4
......@@ -65,7 +65,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1765769401102260}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5, y: -1.34, z: 0}
m_LocalPosition: {x: 5, y: -3.81, z: 0}
m_LocalScale: {x: 3, y: 5, z: 1}
m_Children:
- {fileID: 4130203676348586}
......@@ -211,6 +211,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
speed: 4
points: 10
explosion: {fileID: 1349330085042370, guid: 0ac730bfcfd78434a97df3989e6443c7, type: 2}
--- !u!212 &212894587835513782
SpriteRenderer:
m_ObjectHideFlags: 1
......
......@@ -198,6 +198,7 @@ GameObject:
- component: {fileID: 89139955}
- component: {fileID: 89139956}
- component: {fileID: 89139957}
- component: {fileID: 89139958}
m_Layer: 0
m_Name: LevelMaster
m_TagString: LevelMaster
......@@ -330,6 +331,19 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &89139958
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 89139954}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26745d9592487994d8b2f3dd21daa035, type: 3}
m_Name:
m_EditorClassIdentifier:
score: {fileID: 1270994740}
combo: {fileID: 1828139996}
--- !u!1 &285270820
GameObject:
m_ObjectHideFlags: 0
......@@ -362,6 +376,9 @@ MonoBehaviour:
goodCollider: {fileID: 1746446293}
badCollider: {fileID: 1795598302}
perfectRope: {fileID: 1309197447}
perfectHit: {fileID: 1290046360213332, guid: 107a7a15d7e65914d89e2647ad01e920, type: 2}
goodHit: {fileID: 1301897093530838, guid: fe523caf0352a7547a3f1404bd46b43d, type: 2}
badHit: {fileID: 1349330085042370, guid: 0ac730bfcfd78434a97df3989e6443c7, type: 2}
sepparation: 1
filter:
useTriggers: 0
......@@ -452,6 +469,77 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &333498655
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 333498656}
- component: {fileID: 333498658}
- component: {fileID: 333498657}
m_Layer: 0
m_Name: score/combo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &333498656
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 333498655}
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_Children:
- {fileID: 1270994739}
- {fileID: 1828139995}
m_Father: {fileID: 1542602636}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -125, y: -100}
m_SizeDelta: {x: -350, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &333498657
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 333498655}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &333498658
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 333498655}
m_CullTransparentMesh: 0
--- !u!1 &375935313
GameObject:
m_ObjectHideFlags: 0
......@@ -581,6 +669,68 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.9, y: 0.3}
m_EdgeRadius: 0
--- !u!1 &424158763
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 424158766}
- component: {fileID: 424158765}
- component: {fileID: 424158764}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &424158764
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 424158763}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &424158765
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 424158763}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &424158766
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 424158763}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
......@@ -1176,6 +1326,81 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1270994738
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1270994739}
- component: {fileID: 1270994741}
- component: {fileID: 1270994740}
m_Layer: 0
m_Name: Score
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1270994739
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1270994738}
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_Children: []
m_Father: {fileID: 333498656}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -110, y: 0}
m_SizeDelta: {x: -260, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1270994740
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1270994738}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Score: 10000000'
--- !u!222 &1270994741
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1270994738}
m_CullTransparentMesh: 0
--- !u!1 &1309197447
GameObject:
m_ObjectHideFlags: 0
......@@ -1290,11 +1515,6 @@ Prefab:
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 61597912326454196, guid: 72656df34da634e679741c24832b3f36,
type: 2}
propertyPath: m_Size.y
value: 0.001
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72656df34da634e679741c24832b3f36, type: 2}
m_IsPrefabAsset: 0
......@@ -1598,6 +1818,100 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1542602632
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1542602636}
- component: {fileID: 1542602635}
- component: {fileID: 1542602634}
- component: {fileID: 1542602633}
m_Layer: 0
m_Name: UI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1542602633
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542602632}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1542602634
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542602632}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &1542602635
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542602632}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 1
m_Camera: {fileID: 519420031}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1542602636
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1542602632}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 333498656}
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1746446291
GameObject:
m_ObjectHideFlags: 0
......@@ -1706,3 +2020,78 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.9, y: 3}
m_EdgeRadius: 0
--- !u!1 &1828139994
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1828139995}
- component: {fileID: 1828139997}
- component: {fileID: 1828139996}
m_Layer: 0
m_Name: Combo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1828139995
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1828139994}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.999954, y: 0.999954, z: 0.999954}
m_Children: []
m_Father: {fileID: 333498656}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 140, y: -0.0000014305115}
m_SizeDelta: {x: -320, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1828139996
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1828139994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Combo: 1000'
--- !u!222 &1828139997
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1828139994}
m_CullTransparentMesh: 0
......@@ -6,6 +6,7 @@ public class Key : MonoBehaviour {
public float speed = 1f;
public int points = 10;
public GameObject explosion;
// Use this for initialization
void Start () {
......@@ -17,6 +18,8 @@ public class Key : MonoBehaviour {
transform.Translate(Vector3.down * speed * Time.deltaTime, Space.World);
if(!isVisible()){
MimeMime.MissHit(GetComponent<Key>());
Instantiate(explosion, transform.position, transform.rotation);
Destroy(gameObject);
}
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LevelManager : MonoBehaviour {
public Text score;
public Text combo;
// Use this for initialization
void Start () {
}
private void FixedUpdate() {
score.text = "Score: " + (int)MimeMime.PlayerScore;
combo.text = "Combo: " + MimeMime.Combo;
}
}
fileFormatVersion: 2
guid: 26745d9592487994d8b2f3dd21daa035
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -4,24 +4,89 @@ using UnityEngine;
public class MimeMime : MonoBehaviour {
public static float playerScore;
private static float playerScore;
private static int combo;
private static float comboMultiplyer;
private static int totalNotes;
private static int perfectHits;
private static int goodHits;
private static int badHits;
private static int misses;
private static int badCount;
public static void PerfectHit(Key key)
{
playerScore += key.points;
addPlayerScore(key.points);
perfectHits++;
updateMultiplyer();
Combo += 1;
}
public static void GoodHit(Key key)
{
playerScore += key.points * 0.8f;
addPlayerScore(key.points * 0.8f);
goodHits++;
updateMultiplyer();
}
public static void BadHit(Key key)
{
playerScore += key.points * 0.5f;
addPlayerScore(key.points * 0.4f);
badHits++;
badCount++;
updateMultiplyer();
Combo -= badCount;
}
public static void MissHit(Key key) {
addPlayerScore(key.points * 0.2f);
misses++;
badCount++;
updateMultiplyer();
Combo -= badCount;
}
public static int Combo {
set {
if(value < 0) {
combo = value;
} else {
if(value > 80) {
badCount = 1;
}else if(value > 40) {
badCount = 1;
}else if(value > 20) {