/// <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(); } }
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 }
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); } }
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>()); } } } }
/// <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); }
/// <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); }
void OnProximityChange(PAProximity.Proximity proximity) { Time.timeScale = ((proximity == PAProximity.Proximity.NEAR) ? timeScaleOn : timeScaleOff); }