Example #1
0
    public void OnButtonUp(TargetManagerInputType inputType)
    {
        SpriteRenderer sprite = GetMappedSprite(inputType);

        if(sprite != null)
        {
            Color color = sprite.color;
            color.a = alpha;
            sprite.color = color;
        }
    }
Example #2
0
	public SpriteRenderer GetMappedSprite(TargetManagerInputType inputType)
	{
		switch(inputType)
		{
		case TargetManagerInputType.Up: return upSprite;
		case TargetManagerInputType.Down: return downSprite;
		case TargetManagerInputType.Left: return leftSprite;
		case TargetManagerInputType.Right: return rightSprite;
		default: return null;
		}
	}
Example #3
0
	public void HandleInput(TargetManagerInputType inputType)
	{
		NoteType noteType = GetMappedNoteType(inputType);

		for(int i = 0; i < notes.Count; ++i)
		{
			Note currNote = notes[i];

			if(currNote.Type == noteType)
			{
				caughtCount++;
				UpdateAccuracy ();
				notes.Remove(currNote);
				--i;
				currNote.gameObject.SetActive(false);
			}
		}
	}
Example #4
0
	public NoteType GetMappedNoteType(TargetManagerInputType inputType)
	{
		switch(inputType)
		{
		case TargetManagerInputType.Up: return NoteType.High;
		case TargetManagerInputType.Down: return NoteType.Low;
		case TargetManagerInputType.Left: return NoteType.MidLow;
		case TargetManagerInputType.Right: return NoteType.MidHigh;
		default: return NoteType.Undefined;
		}
	}