Exemplo n.º 1
0
 public void GiveGirl(Prostitute girl)
 {
     Debug.Log(currentcustomer.tablenumber);
     Destroy(girl.Girlmade);
     if (currentcustomer.killer == true)
     {
         girl.killed = true;
     }
     girl.rented = true;
     Destroy(this.gameObject);
     gameManager.CustomerSpawned = false;
     if (currentcustomer.tablenumber == 1)
     {
         gameManager.table1taken = false;
     }
     if (currentcustomer.tablenumber == 2)
     {
         gameManager.table2taken = false;
     }
     if (currentcustomer.tablenumber == 3)
     {
         gameManager.table3taken = false;
     }
     if (currentcustomer.tablenumber == 4)
     {
         gameManager.table4taken = false;
     }
     gameManager.table1taken = false;
     gameManager.table3taken = false;
     gameManager.table2taken = false;
     gameManager.table4taken = false;
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        //Prostitute(Sprite sprite, string name, int preference, highlighted)
        Prostitute Bertha  = new Prostitute(Berthas, 1, false);
        Prostitute Amalia  = new Prostitute(Amalias, 2, false);
        Prostitute Eleanor = new Prostitute(Eleanors, 3, false);
        Prostitute Fannie  = new Prostitute(Fannies, 4, false);
        Prostitute Mollie  = new Prostitute(Mollies, 5, false);
        Prostitute Pearl   = new Prostitute(Pearls, 6, false);
        Prostitute Ai      = new Prostitute(Ais, 7, false);


        Prostitutes = new Prostitute[8];

        Prostitutes[1] = Bertha;
        Prostitutes[2] = Amalia;
        Prostitutes[3] = Eleanor;
        Prostitutes[4] = Fannie;
        Prostitutes[5] = Mollie;
        Prostitutes[6] = Pearl;
        Prostitutes[7] = Ai;

        Prostitutes[1].killed = true;
        Prostitutes[2].killed = true;
        Prostitutes[3].killed = true;
        Prostitutes[4].killed = true;
        Prostitutes[5].killed = true;
        Prostitutes[6].killed = true;


        //Alcohol(Sprite sprite, string name, int preference, served, highlighted)
        Alcohol Bottle    = new Alcohol(Bottles, 1, false, false);
        Alcohol Shot      = new Alcohol(Shots, 2, false, false);
        Alcohol Glass     = new Alcohol(Glasss, 3, false, false);
        Alcohol BottleFat = new Alcohol(BottleFats, 4, false, false);

        Alcohols = new Alcohol[5];

        Alcohols[1] = Bottle;
        Alcohols[2] = Shot;
        Alcohols[3] = Glass;
        Alcohols[4] = BottleFat;

        //public Food(GameObject Prefab_, int preference, bool served_, bool highlighted_)
        Food Steak   = new Food(Steaks, 1, false, false);
        Food BB      = new Food(BBs, 2, false, false);
        Food BG      = new Food(BGs, 3, false, false);
        Food Chicken = new Food(Chickens, 4, false, false);

        Foods = new Food[5];

        Foods[1] = Steak;
        Foods[2] = BB;
        Foods[3] = BG;
        Foods[4] = Chicken;

        DontDestroyOnLoad(this.gameObject);
        Killed();
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        SpawnGirl = SpawnGirls();
        if (SpawnGirl != null)
        {
            SpawnGirl.Girlmade = Instantiate <GameObject>(SpawnGirl.Prefab);
        }


        SceneChanger = CheckGirls();
        if (SceneChanger == null && ledgerlaoded == false)
        {
            SceneManager.LoadScene("Ledger");
            ledgerlaoded = true;
        }

        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Camera.main.transform.forward);
            if (hit)
            {
                if (hit.collider.gameObject.tag == "Chef" && SomethingsHighlighted == false)
                {
                    FoodPanel.SetActive(true);
                    foodpanelopen = true;
                }
                if (hit.collider.gameObject.tag == "Bar" && SomethingsHighlighted == false)
                {
                    BarPanel.SetActive(true);
                    barpanelopen = true;
                }
                if (hit.collider.gameObject.tag == "Bottle" && SomethingsHighlighted == false)
                {
                    Alcohols[1].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "Shot" && SomethingsHighlighted == false)
                {
                    Alcohols[2].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "Glass" && SomethingsHighlighted == false)
                {
                    Alcohols[3].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "BottleFat" && SomethingsHighlighted == false)
                {
                    Alcohols[4].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "Steak" && SomethingsHighlighted == false)
                {
                    Foods[1].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "BB" && SomethingsHighlighted == false)
                {
                    Foods[2].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "BG" && SomethingsHighlighted == false)
                {
                    Foods[3].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "Chicken" && SomethingsHighlighted == false)
                {
                    Foods[4].Highlighted = true;

                    SomethingsHighlighted = true;
                }
                if (hit.collider.gameObject.tag == "Customer" && SomethingsHighlighted == false)
                {
                    FollowMouseScript.SetDraggingObject(hit.collider.gameObject);
                    ledgerlaoded = false;
                }
                if (hit.collider.gameObject.tag == "CustomerSitting" && SomethingsHighlighted == true)
                {
                    OS = GameObject.FindGameObjectWithTag("CustomerSitting").GetComponent <OrderShit>();
                    Debug.Log("CustomerSitting");
                    DrinkGiven = FindAlcohol();
                    if (DrinkGiven == null)
                    {
                        FoodGiven = FindFood();
                        if (FoodGiven != null)
                        {
                            OS.GiveFood(FoodGiven);
                        }
                        else
                        {
                            GirlGiven = FindProstitute();
                            if (GirlGiven != null)
                            {
                                OS.GiveGirl(GirlGiven);
                            }
                            else
                            {
                            }
                        }
                    }
                    else
                    {
                        Debug.Log("givedrink");
                        OS.GiveDrink(DrinkGiven);
                    }
                }

                if (hit.collider.gameObject.tag == "Bertha" && SomethingsHighlighted == false)
                {
                    Prostitutes[1].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Amalia" && SomethingsHighlighted == false)
                {
                    Prostitutes[2].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Eleanor" && SomethingsHighlighted == false)
                {
                    Prostitutes[3].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Fannie" && SomethingsHighlighted == false)
                {
                    Prostitutes[4].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Mollie" && SomethingsHighlighted == false)
                {
                    Prostitutes[5].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Pearl" && SomethingsHighlighted == false)
                {
                    Prostitutes[6].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
                if (hit.collider.gameObject.tag == "Ai" && SomethingsHighlighted == false)
                {
                    Prostitutes[7].Highlighted = true;
                    SomethingsHighlighted      = true;
                }
            }
            else
            {
                Debug.Log("else");
                if (foodpanelopen == true)
                {
                    //  FoodPanel.SetActive(false);
                    // foodpanelopen = false;
                }
                if (barpanelopen == true)
                {
                    // BarPanel.SetActive(false);
                    // barpanelopen = false;
                }
                if (SomethingsHighlighted == true)
                {
                    Debug.Log("running");
                    for (int i = 1; i < Alcohols.Length; i++)
                    {
                        if (Alcohols[i].Highlighted == true)
                        {
                            Alcohols[i].Highlighted = false;
                            SomethingsHighlighted   = false;
                        }
                    }
                    for (int i = 1; i < Foods.Length; i++)
                    {
                        if (Foods[i].Highlighted == true)
                        {
                            Foods[i].Highlighted  = false;
                            SomethingsHighlighted = false;
                        }
                    }
                    for (int i = 1; i < Prostitutes.Length; i++)
                    {
                        if (Prostitutes[i].Highlighted == true)
                        {
                            Prostitutes[i].Highlighted = false;
                            SomethingsHighlighted      = false;
                        }
                    }
                }
            }
        }
    }