Commit 57d048ed authored by 16도재형's avatar 16도재형 Committed by Chae Ho Shin

SetSelect scene almost done

parent 38fb1af7
...@@ -391,6 +391,7 @@ GameObject: ...@@ -391,6 +391,7 @@ GameObject:
- component: {fileID: 609057691} - component: {fileID: 609057691}
- component: {fileID: 609057690} - component: {fileID: 609057690}
- component: {fileID: 609057689} - component: {fileID: 609057689}
- component: {fileID: 609057692}
m_Layer: 0 m_Layer: 0
m_Name: Managers m_Name: Managers
m_TagString: Untagged m_TagString: Untagged
...@@ -439,6 +440,17 @@ Transform: ...@@ -439,6 +440,17 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &609057692
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 609057688}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6e697643158480b4ba850d906eac1bc2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &634338382 --- !u!1 &634338382
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -22,7 +22,13 @@ public class InputManager : MonoBehaviour { ...@@ -22,7 +22,13 @@ public class InputManager : MonoBehaviour {
} }
} }
private bool IsButtonDown { get; set; } private KeyCode theButton = KeyCode.Space | KeyCode.Joystick1Button0;
private bool IsButtonDownPrev { get; set; }
private bool IsButtonDown
{
get { return Input.GetKey(theButton); }
}
public MotionState CurrentMotionState { get; set; } public MotionState CurrentMotionState { get; set; }
...@@ -30,7 +36,7 @@ public class InputManager : MonoBehaviour { ...@@ -30,7 +36,7 @@ public class InputManager : MonoBehaviour {
{ {
get get
{ {
return !IsButtonDown && Input.anyKey; return !IsButtonDownPrev && IsButtonDown;
} }
} }
...@@ -38,7 +44,7 @@ public class InputManager : MonoBehaviour { ...@@ -38,7 +44,7 @@ public class InputManager : MonoBehaviour {
{ {
get get
{ {
return IsButtonDown && !Input.anyKey; return IsButtonDownPrev && !IsButtonDown;
} }
} }
...@@ -46,7 +52,7 @@ public class InputManager : MonoBehaviour { ...@@ -46,7 +52,7 @@ public class InputManager : MonoBehaviour {
{ {
get get
{ {
return IsButtonDown && Input.anyKey; return IsButtonDownPrev && IsButtonDown;
} }
} }
...@@ -58,6 +64,6 @@ public class InputManager : MonoBehaviour { ...@@ -58,6 +64,6 @@ public class InputManager : MonoBehaviour {
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
IsButtonDown = Input.anyKey; IsButtonDownPrev = IsButtonDown;
} }
} }
\ No newline at end of file
...@@ -32,6 +32,8 @@ public abstract class MotionNote : Note ...@@ -32,6 +32,8 @@ public abstract class MotionNote : Note
protected static Sprite LoadNewSprite(string FilePath, float PixelsPerUnit = 100.0f) protected static Sprite LoadNewSprite(string FilePath, float PixelsPerUnit = 100.0f)
{ {
return null;
Sprite NewSprite = new Sprite(); Sprite NewSprite = new Sprite();
Texture2D SpriteTexture = LoadTexture(FilePath); Texture2D SpriteTexture = LoadTexture(FilePath);
NewSprite = Sprite.Create(SpriteTexture, NewSprite = Sprite.Create(SpriteTexture,
......
...@@ -24,14 +24,17 @@ public class TrackManager : MonoBehaviour { ...@@ -24,14 +24,17 @@ public class TrackManager : MonoBehaviour {
currentBackgroundIndex = (currentBackgroundIndex + 1) % 2; currentBackgroundIndex = (currentBackgroundIndex + 1) % 2;
trackList.GetComponent<RawImage>().texture = backgrounds[currentBackgroundIndex]; trackList.GetComponent<RawImage>().texture = backgrounds[currentBackgroundIndex];
GameManager.Instance.CurrentTrack = trackList.transform.GetChild(2).GetComponent<TrackInfoHolder>().trackInfo; if (selectedTrackItem != null)
Debug.Log(GameManager.Instance.CurrentTrack.Title); selectedTrackItem.GetComponentInChildren<Text>().color = Color.white;
selectedTrackItem = trackList.transform.GetChild(2).gameObject;
selectedTrackItem.GetComponentInChildren<Text>().color = Color.black;
} }
// Use this for initialization // Use this for initialization
void Start() void Start()
{ {
LoadTracks(); LoadTracks();
TrackBrowse();
} }
// Update is called once per frame // Update is called once per frame
...@@ -47,6 +50,8 @@ public class TrackManager : MonoBehaviour { ...@@ -47,6 +50,8 @@ public class TrackManager : MonoBehaviour {
trackList.transform.GetChild(trackList.transform.childCount - 1).SetAsFirstSibling(); trackList.transform.GetChild(trackList.transform.childCount - 1).SetAsFirstSibling();
TrackBrowse(); TrackBrowse();
} }
if (InputManager.Instance.IsButtonPressed)
StartTrack();
} }
void LoadTracks() void LoadTracks()
...@@ -54,7 +59,9 @@ public class TrackManager : MonoBehaviour { ...@@ -54,7 +59,9 @@ public class TrackManager : MonoBehaviour {
var files = new DirectoryInfo("Assets/Tracks") var files = new DirectoryInfo("Assets/Tracks")
.GetFiles("*.bpe", SearchOption.AllDirectories); .GetFiles("*.bpe", SearchOption.AllDirectories);
TrackInfo[] tracks = files.Select(s => new TrackInfo(s)).ToArray(); List<TrackInfo> tracks = files.Select(s => new TrackInfo(s)).ToList();
while (tracks.Count() < 5)
tracks.AddRange(tracks);
foreach (TrackInfo track in tracks) foreach (TrackInfo track in tracks)
{ {
...@@ -73,6 +80,8 @@ public class TrackManager : MonoBehaviour { ...@@ -73,6 +80,8 @@ public class TrackManager : MonoBehaviour {
GameManager.Instance.CurrentTrack = holder.trackInfo; GameManager.Instance.CurrentTrack = holder.trackInfo;
Destroy(this);
GameManager.Instance.SceneTransition("InGame"); GameManager.Instance.SceneTransition("InGame");
} }
} }
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7c71eb6382b65024390d02b33054ad2d guid: a3a5d9cfc7425bc4e8020ffd9fa7cea5
folderAsset: yes folderAsset: yes
timeCreated: 1501323034 timeCreated: 1503582657
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
......
#TITLE PARANOiA -Test-
#ARTIST 128
#GENRE None
#BPM 128
#PLAYLEVEL
#001SBT AAAAAAAA
#002SMO CPCPCPCP
#003LMO BH00
#004LMO BH00
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3460e0f5820b5e84b85eed642afe9c38 guid: 5ed10dbe99e5df949a1647e3e633e6cb
timeCreated: 1501736693 timeCreated: 1503582657
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
......
fileFormatVersion: 2
guid: 39b6be399847d4b4e8a2341a88a21454
timeCreated: 1503582660
licenseType: Free
AudioImporter:
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
#TITLE Tutorial
#ARTIST Various Artists
#GENRE TUTORIAL CORE
#BPM 120
#PLAYLEVEL 0
#002SBT AA000000000000000000000000AA
#003LBT AA00000000000000AA00BB00BB000000
#004LBT AA00
#008LBT 00AA
\ No newline at end of file
Markdown is supported
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