public void HoldForChair(SpawnableObject sObj) { if (sObj.gameObject.name.Contains("tableDinner") || sObj.gameObject.name.Contains("DeskWithDrawers")) { _boxcond = BoxCondition.ChairSpot; _furniture = sObj.gameObject; //ChangeColor(_furniture); } }
public void ReSetFurniture() { _boxcond = BoxCondition.Free; _furniture = null; //if (_carpet == null) // GetComponent<Renderer>().enabled = false; }
private void Start() { if (OccupiedBoxes.Contains(gameObject.name)) { _boxcond = BoxCondition.Occupied; _furniture = gameObject; //GetComponent<Renderer>().enabled = true; //GetComponent<Renderer>().material.color = Color.red; } if (gameObject.name.Contains(", 0")) { _boxloc = BoxLocation.South; } else if (gameObject.name.Contains(", 7")) { _boxloc = BoxLocation.North; } else if (gameObject.name.Contains("7, ")) { _boxloc = BoxLocation.East; } else if (gameObject.name.Contains("0, ")) { _boxloc = BoxLocation.West; } else { _boxloc = BoxLocation.Middle; } }
public void SetWallObject(SpawnableWallObject swo) { if (_boxcond == BoxCondition.Occupied) return; if (_wallObj == null) { _boxcond = BoxCondition.OnWall; _wallObj = swo.gameObject; //ChangeColor(_wallObj); } if (swo == null) { _boxcond = BoxCondition.Free; _wallObj = null; } }
public void SetFurniture(SpawnableObject sObj) { if (_boxcond == BoxCondition.Occupied) return; if (_furniture == null) { if (sObj.localTag == SpawnableObject.Tag.Short) _boxcond = BoxCondition.Short; else if (sObj.localTag == SpawnableObject.Tag.Tall) _boxcond = BoxCondition.Tall; _furniture = sObj.gameObject; //ChangeColor(_furniture); } }
public void SetChair(SpawnableChair sc) { if (_boxcond == BoxCondition.Occupied) return; if (_furniture == null || _furniture.gameObject.name.Contains("tableDinner")) { _boxcond = BoxCondition.Short; _furniture = sc.gameObject; //ChangeColor(_furniture); } }