public override void UseItem(GameObject target) { Progresser progress = target.GetComponent <Progresser>(); if (progress.itemRequest == type) { progress.sendTranmission(); } else { progress.setStatus(false, 1, 3f); } }
public override void UseItem(GameObject target) { Progresser progresserChecker = target.GetComponent <Progresser>(); if (progresserChecker.itemRequest == type) { print("use"); progresserChecker.sendTranmission(); Destroy(this.gameObject, 0.5f); } else { progresserChecker.setStatus(false, 1, EffectDuration); Destroy(this.gameObject, 0.5f); } }
public override void UseItem(GameObject target) { Player playerChecker = target.GetComponent <Player>(); Progresser progresserChecker = target.GetComponent <Progresser>(); if (playerChecker != null) { //Effect on Player playerChecker.setStatus(false, -3f, EffectDuration); } else if (progresserChecker != null) { //Effect on Progresser progresserChecker.setStatus(true, 4, EffectDuration * 2); } Destroy(this.gameObject, 0.5f); }