public override void InteractWithObject(CharacterInteractControl interactZone) { // If empty && player has valid object, take object if (mixObject1 == null && mixTimeRemaining <= 0 && interactZone.IsHoldingObject()) { interactZone.GiveAttachedObj(this); return; } if (mixObject1 != null && mixObject2 == null && mixTimeRemaining <= 0 && interactZone.IsHoldingObject()) { interactZone.GiveAttachedObj(this); return; } // If full and cooking completed, and player is empty, give result to player if (mixObject1 != null && mixTimeRemaining <= 0 && !interactZone.IsHoldingObject()) { interactZone.AttachCarryableObject(QueryMixedObject()); mixObject1 = null; mixObject2 = null; currentItem1.SetActive(false); PlaySoundFX(1); return; } }
public override void InteractWithObject(CharacterInteractControl obj) { if (cooldownCounter - Time.time > cooldownTime) { // TODO: Play rejected sound return; } obj.GiveAttachedObj(this); }
public override void InteractWithObject(CharacterInteractControl interactZone) { // If empty && player has valid object, take object and begin cooking it if (cookingObject == null && cookTimeRemaining <= 0 && interactZone.IsHoldingObject()) { interactZone.GiveAttachedObj(this); //PlaySoundFX(0); return; } // If full and cooking completed, and player is empty, give result to player if (cookingObject != null && cookTimeRemaining <= 0 && !interactZone.IsHoldingObject()) { interactZone.AttachCarryableObject(QueryCookedObject()); cookingObject = null; currentItem.SetActive(false); PlaySoundFX(1); return; } }