Ejemplo n.º 1
0
 public static void PostSpreadEvent(SpreadEventArgs args = null)
 {
     if (SpreadEvent != null)
     {
         SpreadEvent(args);
     }
 }
Ejemplo n.º 2
0
    private void FireSpreadEvent(float dist_diff)
    {
        Debug.Log("Spread");

        if (dist_diff > 0)
        {
            Debug.Log("Spread");
        }

        else
        {
            Debug.Log("Pinch");
        }

        Vector2 midPoint = GetMidPoint(gesture_finger1.position, gesture_finger2.position);

        GameObject hitObj = GetHit(midPoint);

        SpreadEventArgs args = new SpreadEventArgs(gesture_finger1, gesture_finger2, dist_diff, hitObj);

        if (OnPinchSpread != null)
        {
            OnPinchSpread(this, args);
        }

        if (hitObj != null)
        {
            IPinchSpread pinchSpread = hitObj.GetComponent <IPinchSpread>();
            if (pinchSpread != null)
            {
                pinchSpread.OnPinchSpread(args);
            }
        }
    }
Ejemplo n.º 3
0
    public void OnPinchSpread(SpreadEventArgs args)
    {
        if (args.HitObject == gameObject)
        {
            float   scale       = (args.DistanceDiff / Screen.dpi) * scaleSpeed;
            Vector3 scaleVector = new Vector3(scale, scale, scale);

            transform.localScale += scaleVector;
        }
    }
Ejemplo n.º 4
0
 void OnSpreadEvent(SpreadEventArgs args)
 {
     //Debug.Log (um.tm.milestones.ToString ());
     //Debug.Log (args.turn);
     if (!um.tm.milestones [15] && args.turn > 5)
     {
         um.tm.enqueueClip(15);
         um.tm.milestones [15] = true;
     }
     else if (!um.tm.milestones [16] && args.turn >= 10)
     {
         um.tm.enqueueClip(16);
         um.tm.milestones [16] = true;
     }
     //Debug.Log ("Recieved Cleanse Event");
 }
Ejemplo n.º 5
0
    private void FIreSpreadEvent(float dist_diff)
    {
        if (dist_diff > 0)
        {
            Debug.Log("Spread");
        }
        else
        {
            Debug.Log("pinch");
        }

        SpreadEventArgs args = new SpreadEventArgs(gesture_finger, gesture_finger, dist_diff);

        if (OnPinchSpread != null)
        {
            OnPinchSpread(this, args);
        }

        isTouching = false;
    }
Ejemplo n.º 6
0
 public void OnPinchSpread(object sender, SpreadEventArgs args)
 {
     if (args.DistanceDiff > 0)
     {
         if (shield != null)
         {
             Image img = shield.GetComponent <Image>();
             img.enabled   = true;
             isshiedactive = true;
         }
     }
     else
     {
         if (slider.value.Equals(100))
         {
             Debug.Log("super");
             slider.value = 0;
             EnemyManager.GetInstance().SuperBullet();
         }
     }
 }