public void SetUsableThing(UsableThing newThing) { // check if the usable thing requires equipment if (newThing.requireEquipment) { if (newThing.requiredEquipment == null) { // it requires we DON'T have equipment if (equipment != null) { return; } } else { // it requires a certain piece of equipment if (equipment == null || (newThing.requiredEquipment != equipment && newThing.requiredEquipment != equipment.eqPrefab)) { return; } } } thing = newThing; thingDescLabel.text = thing.description; thingDesc.SetActive(true); }
public void ClearUsableThing(UsableThing newThing) { if (thing == newThing) { thing = null; thingDesc.SetActive(false); } }
public void Start() { thing = null; thingDesc.SetActive(false); }