Exemplo n.º 1
0
 public void HoldForChair(SpawnableObject sObj)
 {
     if (sObj.gameObject.name.Contains("tableDinner") || sObj.gameObject.name.Contains("DeskWithDrawers")) {
         _boxcond = BoxCondition.ChairSpot;
         _furniture = sObj.gameObject;
         //ChangeColor(_furniture);
     }
 }
Exemplo n.º 2
0
 public void ReSetFurniture()
 {
     _boxcond = BoxCondition.Free;
     _furniture = null;
     //if (_carpet == null)
     //  GetComponent<Renderer>().enabled = false;
 }
Exemplo n.º 3
0
    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;
        }
    }
Exemplo n.º 4
0
    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;
        }
    }
Exemplo n.º 5
0
    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);
        }
    }
Exemplo n.º 6
0
    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);
        }
    }