示例#1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Weapon"))
     {
         PickUpWeapon(collision.gameObject.name);
     }
     if (collision.gameObject.CompareTag("Coin"))
     {
         MoneySystem.AddMoney(1);
     }
 }
    public void EvaluateOrder()
    {
        //Assume
        bool orderComplete = true;

        for (int i = 0; i < order.items.Count; i++)
        {
            if (!order.items[i].has)
            {
                orderComplete = false;
                break;
            }
        }

        if (orderComplete)
        {
            serviceComplete = true;
            happiness       = 1;
            MoneySystem.AddMoney(order.cost);
            orderBubble.Clear();
        }
    }