public void SetReticle(ReticleType reticle) { SelectedReticle = reticle; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SelectedReticle))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CrosshairReticleVisibility))); }
public void SetNoReticle() { ClearTiles(); ClearRangeTiles(); castableTiles.Clear(); reticleTiles.Clear(); reticle = ReticleType.None; toggle = true; }
public void SetType(ReticleType type) { // Set global variable Type = type; // Get image texture Texture texture = GetImage(type); // Change image in GUI SetImage(texture); }
/* Gets the image texture for a reticle enumerated type */ private Texture GetImage(ReticleType type) { // Init string name; Texture texture; // Decide switch (type) { case ReticleType.Ready: name = "ready"; texture = Ready; break; case ReticleType.NotReady: name = "notready"; texture = NotReady; break; case ReticleType.Heal: name = "heal"; texture = Heal; break; case ReticleType.FireHit: name = "fire_hit"; texture = FireHit; break; case ReticleType.FireMiss: name = "fire_miss"; texture = FireMiss; break; case ReticleType.PickupInRange: name = "pickup_in"; texture = PickupInRange; break; case ReticleType.PickupOutOfRange: name = "pickup_out"; texture = PickupOutOfRange; break; default: // default: not ready name = "notready"; texture = NotReady; break; } // Return return(texture); }
void ReticleMask(int type) { Is = (ReticleType)type; for (int i = 0; i < reticleType.Count; i++) { if (i == type) { reticleType[i].SetActive(true); } else { reticleType[i].SetActive(false); } } }
public void SetSquareReticle(int x) { ClearTiles(); reticle = ReticleType.Square; radius = x; }
public void SetDiamondReticle(int x) { ClearTiles(); reticle = ReticleType.Diamond; radius = x; }