private void ResetOccupantInfo() { _occupiedBy = null; _isOccupied = false; _occupantType = OccupyingType.Null; _blockAbove = null; }
private void SetOccupiedBy(GameObject occupant) { _occupiedBy = occupant; var blockOfOccupant = occupant.GetComponentInChildren <Block>(); if (blockOfOccupant != null) { blockOfOccupant.SetBlockBeneath(this); _occupantType = OccupyingType.Block; _blockAbove = blockOfOccupant; } else { _occupantType = GetOccupantType(occupant); } _isOccupied = true; }