Beispiel #1
0
    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();
    }
Beispiel #2
0
 public static bool deactive_necessary_item(Guid applicationId, Guid knowledgeTypeId,
                                            NecessaryItem itm, Guid currentUserId)
 {
     return(DataProvider.DeactiveNecessaryItem(applicationId, knowledgeTypeId, itm, currentUserId));
 }
Beispiel #3
0
 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);
 }