Beispiel #1
0
    private void DeleteTrap(Vector2 coords)
    {
        Vector2Int iCoords = new Vector2Int((int)coords.x, (int)coords.y);

        trapCurrentNumber[(int)((AbstractTrap)objectGrid.GetCellObject(iCoords)).GetTrapType()]--;
        objectGrid.DeleteCellObject(iCoords);
        if (PlayerPrefs.GetInt("IsNavigator") == 0)
        {
            PV.RPC("DeleteTrap", RpcTarget.Others, coords);
        }
    }
 public override void DeleteSelf(ObjectGrid objectGrid)
 {
     if (pair.alreadyDeleting)
     {
         base.DeleteSelf(objectGrid);
     }
     else
     {
         alreadyDeleting = true;
         objectGrid.DeleteCellObject(pair.Coords);
         base.DeleteSelf(objectGrid);
     }
 }