IEnumerator RecordPosition() { //notify rvealr yield return(new WaitForSeconds(0.1f)); RVEALRManager.RvealrRecord record = new RVEALRManager.RvealrRecord(); record.record_id = "PlayerPosition"; record.record_data = new Dictionary <string, object> { { "PlayerPosition", new Vector3(transform.position.x, transform.position.y, transform.position.z) } }; RVEALRManager.Instance.SendRecord(record); yield return(new WaitForSeconds(0.1f)); StartCoroutine(RecordPosition()); }
void Death() { // The enemy is dead. isDead = true; // Turn the collider into a trigger so shots can pass through it. capsuleCollider.isTrigger = true; // Tell the animator that the enemy is dead. anim.SetTrigger("Dead"); // Change the audio clip of the audio source to the death clip and play it (this will stop the hurt clip playing). enemyAudio.clip = deathClip; enemyAudio.Play(); //notify rvealr RVEALRManager.Instance.RecordGameEvent(); RVEALRManager.RvealrRecord record = new RVEALRManager.RvealrRecord(); record.record_id = "EnemyDeath"; record.record_data = new Dictionary <string, object> { { "EnemyDeath", "1" }, { "Score", scoreValue } }; RVEALRManager.Instance.SendRecord(record); }