This file contains hidden or 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
using UnityEngine; | |
public class NPC : MonoBehaviour | |
{ | |
internal void TakeDamage(int amount) | |
{ | |
GetComponent<IHealth>().TakeDamage(amount); | |
} | |
} |
This file contains hidden or 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
using UnityEngine; | |
using UnityEngine.UI; | |
public class HPBar : MonoBehaviour | |
{ | |
private Slider slider; | |
private void Start() | |
{ | |
slider = GetComponentInChildren<Slider>(); |
This file contains hidden or 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
using UnityEngine; | |
using UnityEngine.UI; | |
public class HPBar : MonoBehaviour | |
{ | |
private Slider slider; | |
private void Start() | |
{ | |
slider = GetComponentInChildren<Slider>(); |
This file contains hidden or 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
using UnityEngine; | |
public class NPCParticles : MonoBehaviour | |
{ | |
[SerializeField] private ParticleSystem deathParticlePrefab; | |
private void Start() | |
{ | |
GetComponent<IHealth>().OnDied += HandleNPCDied; | |
} |
This file contains hidden or 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
using UnityEngine; | |
public class NPCDamager : MonoBehaviour | |
{ | |
private void Update() | |
{ | |
if (Input.GetButtonDown("Fire1")) | |
{ | |
DamageNPCs(); | |
} |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using UnityEngine; | |
public class NumberOfHitsHealth : MonoBehaviour, IHealth | |
{ | |
[SerializeField] | |
private int healthInHits = 5; | |
[SerializeField] |
This file contains hidden or 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
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
/Assets/AssetStoreTools* | |
# Autogenerated VS/MD/Consulo solution and project files | |
ExportedObj/ | |
.consulo/ |
This file contains hidden or 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
using UnityEngine; | |
public class OculusHapticsController : MonoBehaviour | |
{ | |
[SerializeField] | |
OVRInput.Controller controllerMask; | |
private OVRHapticsClip clipLight; | |
private OVRHapticsClip clipMedium; | |
private OVRHapticsClip clipHard; |
This file contains hidden or 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
public enum VibrationForce | |
{ | |
Light, | |
Medium, | |
Hard, | |
} |
This file contains hidden or 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
using UnityEngine; | |
public class OculusDemo : MonoBehaviour | |
{ | |
[SerializeField] | |
OculusHapticsController leftControllerHaptics; | |
[SerializeField] | |
OculusHapticsController rightControllerHaptics; | |