Commit 92a930be authored by gstuitje's avatar gstuitje
Browse files

Added proper Arrows for mime mime, also worked on our first song, Bavaria....

Added proper Arrows for mime mime, also worked on our first song, Bavaria. There is also a computer tested mode which guarantees hitting it "perfectly" with regards to the arrows.
parent 1168c5df
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/Key.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/TextFiles/Bavaria.txt">
<Files>
<File FileName="Assets/TextFiles/TestMultiples.txt" Line="1" Column="1" />
<File FileName="Assets/Scripts/SpawnKeys.cs" Line="60" Column="59" />
<File FileName="Assets/Scripts/Key.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/SpawnKeys.cs" Line="98" Column="112" />
<File FileName="Assets/Scripts/Key.cs" Line="17" Column="41" />
<File FileName="Assets/Scripts/TriggerManager.cs" Line="1" Column="1" />
<File FileName="Assets/TextFiles/Bavaria.txt" Line="5" Column="9" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
......@@ -37,7 +37,7 @@ Transform:
m_GameObject: {fileID: 1765769401102260}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5, y: -3.994, z: 0}
m_LocalScale: {x: 1.6, y: 1.6, z: 1}
m_LocalScale: {x: 3, y: 5, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......@@ -58,7 +58,7 @@ BoxCollider2D:
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 0.8, y: 0.8}
oldSize: {x: 0.3, y: 0.17}
newSize: {x: 0.8, y: 0.8}
adaptiveTilingThreshold: 0.5
drawMode: 0
......@@ -78,7 +78,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3ca1ceb8b7b7e47b0afcf424c76fb6a2, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 2
speed: 4
points: 10
--- !u!212 &212894587835513782
SpriteRenderer:
......@@ -115,7 +115,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 8114e20b9ad01408aa51b3d24d23c01b, type: 3}
m_Sprite: {fileID: 21300000, guid: cfe9ef8fa4ea64a7baf0d1abbda774b3, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
......
......@@ -14,7 +14,7 @@ public class Key : MonoBehaviour {
// Update is called once per frame
void Update () {
transform.Translate(Vector3.down * speed * Time.deltaTime);
transform.Translate(Vector3.down * speed * Time.deltaTime, Space.World);
if(!isVisible()){
Destroy(gameObject);
......
......@@ -4,6 +4,7 @@ using UnityEngine;
public class SpawnKeys : MonoBehaviour {
public bool ComputerCheck = false;
public TextAsset songFile;
public GameObject arrowPrefab;
public float skip;
......@@ -71,8 +72,13 @@ public class SpawnKeys : MonoBehaviour {
music.clip = musicClip;
music.Play();
music.time = skip;
}
// Update is called once per frame
private IEnumerator testNote(string arrow){
yield return new WaitForSeconds(songWaitTime);
TriggerManager tester = GameObject.FindWithTag("TriggerManager").GetComponent<TriggerManager>();
tester.test(arrow);
}
// Update is called once per frame
void Update () {
while (nextKey != null && Time.time > startTime + float.Parse(nextKey[1]) - skip)
{
......@@ -83,19 +89,34 @@ public class SpawnKeys : MonoBehaviour {
case "left":
//print("left");
Instantiate(arrowPrefab, new Vector3(5f, 4f, 1f), Quaternion.identity);
Instantiate(arrowPrefab, new Vector3(5f, 4f, 1f), Quaternion.identity);
if(ComputerCheck == true){
StartCoroutine(testNote("Left"));
}
break;
case "right":
//print("right");
Instantiate(arrowPrefab, new Vector3(8f, 4f, 1f), Quaternion.identity);
Instantiate(arrowPrefab, new Vector3(8f, 4f, 1f), Quaternion.Euler(new Vector3(0, 0, 180)));
if (ComputerCheck == true)
{
StartCoroutine(testNote("Right"));
}
break;
case "up":
//print("up");
Instantiate(arrowPrefab, new Vector3(6f, 4f, 1f), Quaternion.identity);
Instantiate(arrowPrefab, new Vector3(6f, 4f, 1f), Quaternion.Euler(new Vector3(0, 0, 270)));
if (ComputerCheck == true)
{
StartCoroutine(testNote("Up"));
}
break;
case "down":
//print("DOWN");
Instantiate(arrowPrefab, new Vector3(7f, 4f, 1f), Quaternion.identity);
Instantiate(arrowPrefab, new Vector3(7f, 4f, 1f), Quaternion.Euler(new Vector3(0, 0, 90)));
if (ComputerCheck == true)
{
StartCoroutine(testNote("Down"));
}
break;
default:
break;
......
......@@ -50,6 +50,31 @@ public class TriggerManager : MonoBehaviour
}
public void test(string arrow){
//Check which key the player presses
if (arrow == "Left")
{
moveColliders((int)keys.left);
checkLowestKey();
}
if (arrow == "Right")
{
moveColliders((int)keys.right);
checkLowestKey();
}
if (arrow == "Up")
{
moveColliders((int)keys.up);
checkLowestKey();
}
if (arrow == "Down")
{
moveColliders((int)keys.down);
checkLowestKey();
}
}
void moveColliders(int key)
{
perfectCollider.offset = new Vector2(key * sepparation, perfectCollider.offset.y);
......
Bavaria 7.8
Bavaria 8.0
left 0
right 0.3
up 0.6
down 1.1
up 1.6
\ No newline at end of file
right 0.4
up 0.7
down 1.0
up 1.9
up 2.85
left 3.7
right 4.1
up 4.45
down 4.8
up 5.7
down 6.6
left 7.5
up 7.9
down 8.2
right 8.5
up 9.5
down 10.4
down 11.3
down 11.6
up 11.9
right 12.3
\ No newline at end of file
fileFormatVersion: 2
guid: a766db02e520b4bd8b6a2c5b93d8aa5c
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5fb8d263090614be48f5752612e03475
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cfe9ef8fa4ea64a7baf0d1abbda774b3
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 4d4b152cde757432dbabf794abd56bdb
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment