public override void Interact(NecessaryItem itemUsed = NecessaryItem.NA) { base.Interact(); //Josh: Recommend reducing interactable health so we can remove it when exhausted, obviously things like a water collector we won't want to destroy that //Also recommend checking what item the player used on this interactable Vector3Int tilePos = tilemap.layoutGrid.WorldToCell(this.gameObject.transform.position); tilemap.SetTile(tilePos, ReplacementTileAnimated); Pickup(); health--; //if (health <= 0) //DestroyImmediate(this); zeroHealthChecker = health; PlayItemSound(); }
public static bool deactive_necessary_item(Guid applicationId, Guid knowledgeTypeId, NecessaryItem itm, Guid currentUserId) { return(DataProvider.DeactiveNecessaryItem(applicationId, knowledgeTypeId, itm, currentUserId)); }
public virtual void Interact(NecessaryItem itemUsed = NecessaryItem.NA) //by default we don't check for a tool { //This is method is meant to be overwritten Debug.Log("Interacting with " + transform.name); }