void Update() { bool updateHotEntity = !PlayerController.instance.FixedSelection(); pickups.Clear(); if (highlightPickups) { FindVisiblePickups(); } pickupHighlighter.Show(pickups, updateHotEntity); if (updateHotEntity) { if (Ui.Hover) { HotEntity = null; } else if (pickupHighlighter.Hot != null) { HotEntity = pickupHighlighter.Hot; } else { HotEntity = CalcHotEntity(); } } if (HotEntity != null && !highlightPickups) { var character = HotEntity.GetComponent <Character>(); if (character && character.monStat != null) { if (character.monStat.interact) { ShowLabel(HotEntity); } else if (character.monStat.killable) { ShowEnemyBar(character); } else { ShowNothing(); } } else { ShowLabel(HotEntity); } } else { ShowNothing(); } }
void Update() { bool updateHotEntity = !PlayerController.instance.FixedSelection(); loots.Clear(); if (highlightLoot) { FindVisibleLoots(); } _lootHighlighter.Show(loots, updateHotEntity); if (updateHotEntity) { if (Ui.Hover) { HotEntity = null; } else if (_lootHighlighter.Hot != null) { HotEntity = _lootHighlighter.Hot; } else { HotEntity = CalcHotEntity(); } } if (HotEntity != null && !highlightLoot) { var unit = HotEntity.GetComponent <Unit>(); if (unit && unit.monStat != null) { if (unit.monStat.interact) { ShowLabel(HotEntity); } else if (unit.monStat.killable) { ShowEnemyBar(unit); } else { ShowNothing(); } } else { ShowLabel(HotEntity); } } else { ShowNothing(); } }
void Update() { bool updateHotEntity = !PlayerController.instance.FixedSelection(); if (!highlightPickups) { pickups.Clear(); } pickupHighlighter.Show(pickups, updateHotEntity); pickups.Clear(); if (updateHotEntity) { if (highlightPickups && pickupHighlighter.Hot != null) { HotEntity = pickupHighlighter.Hot; } else { HotEntity = newHotEntity; } } newHotEntity = null; if (HotEntity != null && !highlightPickups) { var character = HotEntity.GetComponent <Character>(); if (character && character.monStat != null) { if (character.monStat.interact) { ShowLabel(HotEntity); } else if (character.monStat.killable) { ShowEnemyBar(character); } else { ShowNothing(); } } else { ShowLabel(HotEntity); } } else { ShowNothing(); } mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); mousePos.z = 0; }