Skip to content

Instantly share code, notes, and snippets.

@microwavePC
Created June 2, 2017 17:17
Show Gist options
  • Save microwavePC/a6766f84c636aef9d1a42f28135562b2 to your computer and use it in GitHub Desktop.
Save microwavePC/a6766f84c636aef9d1a42f28135562b2 to your computer and use it in GitHub Desktop.
【Xamarin.Forms】iBeaconを検知する処理を簡単に実装できるNuGetパッケージを作ってみた ref: http://qiita.com/microwavePC/items/0030e593545da8c5ed0a
private void setDamageAreaEvent()
{
// ダメージ領域用のiBeaconの近くにいるとき、およそ毎秒1回ペースでダメージ処理を行うようにする。
_beahat.AddObservableBeaconWithCallback(_damageAreaUuid, _damageAreaMajor, _damageAreaMinor,
_thresholdRssi,
1000,
receiveDamage);
}
private void startScan()
{
_beahat.StartScan();
}
private void receiveDamage()
{
// ライフから一定量の数値を引く処理等々
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment