Created
June 2, 2017 17:17
-
-
Save microwavePC/a6766f84c636aef9d1a42f28135562b2 to your computer and use it in GitHub Desktop.
【Xamarin.Forms】iBeaconを検知する処理を簡単に実装できるNuGetパッケージを作ってみた ref: http://qiita.com/microwavePC/items/0030e593545da8c5ed0a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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