コード例 #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();
        }
    }
コード例 #2
0
 void OnProximity(PAProximity.Proximity arg)
 {
     if (arg == PAProximity.Proximity.NEAR)
     {
         //Debug.Log("Proximity Near");
     }
 }
コード例 #3
0
    void OnProximityChange(PAProximity.Proximity proximity)
    {
#if UNITY_EDITOR
#else
        onPocket = ((proximity == PAProximity.Proximity.NEAR) ? true : false);
#endif
    }
コード例 #4
0
 void spin(PAProximity.Proximity arg)
 {
     x += 1;
     if (x == 5)
     {
         Destroy(GameObject.FindWithTag("wall"));
     }
 }
コード例 #5
0
 void Break(PAProximity.Proximity arg)
 {
     x += 1;
     if (x == 5)
     {
         Destroy(this.gameObject);
     }
 }
コード例 #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>());
             }
         }
     }
 }
コード例 #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);
 }
コード例 #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");
 }
コード例 #9
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 SetScaleByProximity(PAProximity.Proximity arg)
 {
     transform.localScale *= ((arg == PAProximity.Proximity.NEAR)  ? 2f : 0.5f);
 }
コード例 #10
0
 void OnProximityChange(PAProximity.Proximity proximity)
 {
     Time.timeScale = ((proximity == PAProximity.Proximity.NEAR) ? timeScaleOn : timeScaleOff);
 }