Beispiel #1
0
    public NoteTouchEffect Instantiate()
    {
        NoteTouchEffect re = GameObject.Instantiate(this);

        re.name = name;
        re.Start();
        re.transform.parent = transform.parent;
        return(re);
    }
Beispiel #2
0
    public void OnTouchDown(GameObject note, TouchCover touch)
    {
        //if (note != null) {
        NoteTouchEffect effectScript = queEffect.Count > 0 ? queEffect.Dequeue() : baseEffectScript.Instantiate();

        effectScript.OnTouchDown(noteCamera.ScreenToWorldPoint(touch.position));
        if (!dicEffect.ContainsKey(note))
        {
            dicEffect.Add(note, effectScript);
        }
        //}
    }
Beispiel #3
0
    public void OnTouchUp(GameObject note)
    {
        if (dicEffect.ContainsKey(note) == false)
        {
            return;
        }

        NoteTouchEffect effectScript = dicEffect[note];

        dicEffect.Remove(note);
        effectScript.OnTouchUp();
        queEffect.Enqueue(effectScript);
    }
Beispiel #4
0
 public NoteTouchEffectManagement(Camera noteCamera, NoteTouchEffect noteMultiTouchEffectScript)
 {
     this.noteCamera  = noteCamera;
     baseEffectScript = noteMultiTouchEffectScript;
     queEffect.Enqueue(noteMultiTouchEffectScript);
 }