예제 #1
0
 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);
 }
예제 #2
0
 public void ClearUsableThing(UsableThing newThing) {
     if (thing == newThing) {
         thing = null;
         thingDesc.SetActive(false);
     }
 }
예제 #3
0
 public void Start() {
     thing = null;
     thingDesc.SetActive(false);
 }