Ejemplo n.º 1
0
    /// <summary>
    /// Sets the scale by proximity.
    /// Method is added to the onProximityChange delegate so must return void and have a PAProximity.Proximity parameter
    /// </summary>
    /// <param name="arg">Argument.</param>
    //void proximTest(PAProximity.Proximity proximity)
    //{
    //    background.color = ((proximity == PAProximity.Proximity.NEAR) ? Color.black : Color.white);
    //    if (proximity == (PAProximity.Proximity.NEAR))
    //        countPushUp += 1;

    //    txtCount.text = countPushUp.ToString();
    //}

    void PushUpDetect(PAProximity.Proximity proximity)
    {
        if (proximity == (PAProximity.Proximity.NEAR) && isLocalPlayer)
        {
            player.CmdAttack();
        }
    }
Ejemplo n.º 2
0
 void OnProximity(PAProximity.Proximity arg)
 {
     if (arg == PAProximity.Proximity.NEAR)
     {
         //Debug.Log("Proximity Near");
     }
 }
    void OnProximityChange(PAProximity.Proximity proximity)
    {
#if UNITY_EDITOR
#else
        onPocket = ((proximity == PAProximity.Proximity.NEAR) ? true : false);
#endif
    }
Ejemplo n.º 4
0
 void spin(PAProximity.Proximity arg)
 {
     x += 1;
     if (x == 5)
     {
         Destroy(GameObject.FindWithTag("wall"));
     }
 }
 void Break(PAProximity.Proximity arg)
 {
     x += 1;
     if (x == 5)
     {
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 6
0
 public void InputProximity(PAProximity.Proximity arg)
 {
     if (arg == PAProximity.Proximity.NEAR)
     {
         isIgnore = true;
         if (isIgnore)
         {
             if (collision.gameObject.tag == "Obstacle")
             {
                 Physics2D.IgnoreCollision(GetComponent <Collider2D>(), collision.gameObject.GetComponent <Collider2D>());
             }
         }
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// The proximity change event, called by unity's SendMessage function.
 /// The method must have a PAProximity.Proximity parameter
 /// </summary>
 /// <param name="proximity">Proximity.</param>
 void OnProximityChange(PAProximity.Proximity proximity)
 {
     GetComponent <Renderer>().material.color = ((proximity == PAProximity.Proximity.NEAR) ? nearColor : farColor);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// The proximity change event, called by unity's SendMessage function.
 /// The method must have a PAProximity.Proximity parameter
 /// </summary>
 /// <param name="proximity">Proximity.</param>
 void OnProximityChange(PAProximity.Proximity proximity)
 {
     //renderer.material.color = ((proximity == PAProximity.Proximity.NEAR) ? nearColor : farColor);
     print("Ganti Warna");
 }
 /// <summary>
 /// Sets the scale by proximity.
 /// Method is added to the onProximityChange delegate so must return void and have a PAProximity.Proximity parameter
 /// </summary>
 /// <param name="arg">Argument.</param>
 void SetScaleByProximity(PAProximity.Proximity arg)
 {
     transform.localScale *= ((arg == PAProximity.Proximity.NEAR)  ? 2f : 0.5f);
 }
Ejemplo n.º 10
0
 void OnProximityChange(PAProximity.Proximity proximity)
 {
     Time.timeScale = ((proximity == PAProximity.Proximity.NEAR) ? timeScaleOn : timeScaleOff);
 }