Ejemplo n.º 1
0
 public mg_pt_GameLogic()
 {
     Minigame   = MinigameManager.GetActive <mg_Pizzatron>();
     m_conveyor = new mg_pt_Conveyor();
     Order      = new mg_pt_Order(this);
     m_pizza    = new mg_pt_Pizza();
 }
        public void Initialize(mg_pt_Resources p_resources, mg_pt_Order p_order)
        {
            m_order        = p_order;
            m_mysteryPizza = p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_MYSTERY);
            m_mysteryPizza.SetActive(value: false);
            MinigameSpriteHelper.AssignParent(m_mysteryPizza, base.gameObject);
            m_mysteryPizza.transform.localPosition = new Vector2(0f, 0.3f);
            m_mysteryText = m_mysteryPizza.transform.Find("text").gameObject;
            m_mysteryText.transform.GetComponent <Renderer>().sortingOrder = -97;
            m_toppings = new List <mg_pt_OrderGroupObject>();
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_SAUCE_01).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_SAUCE_02).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_CHEESE).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_TOPPING_01).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_TOPPING_02).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_TOPPING_03).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.Add(p_resources.GetInstancedResource(mg_pt_EResourceList.GAME_ORDER_TOPPING_04).GetComponent <mg_pt_OrderGroupObject>());
            m_toppings.ForEach(delegate(mg_pt_OrderGroupObject topping)
            {
                MinigameSpriteHelper.AssignParent(topping.gameObject, base.gameObject);
            });
            int i = 0;

            m_toppings.ForEach(delegate(mg_pt_OrderGroupObject topping)
            {
                topping.ToppingType = (mg_pt_EToppingType)(i++);
            });
            m_images = GetComponentsInChildren <SpriteRenderer>(includeInactive: true);
        }
Ejemplo n.º 3
0
 public void Initialize(mg_pt_Resources p_resources, mg_pt_Order p_order)
 {
     m_resources   = p_resources;
     m_orderBubble = GetComponentInChildren <mg_pt_OrderBubbleObject>();
     m_orderBubble.Initialize(p_resources, p_order);
     SetupSpecialData();
     m_chef = m_resources.GetInstancedResource(mg_pt_EResourceList.GAME_SPECIFIC_MIN).GetComponent <mg_pt_ChefObject>();
     MinigameSpriteHelper.AssignParentPositionReset(m_chef.gameObject, base.transform.Find("Chef").gameObject);
     m_defaultCustomer = m_resources.GetInstancedResource(mg_pt_EResourceList.GAME_CUSTOMER_DEFAULT).GetComponentInChildren <mg_pt_CustomerObject>();
     MinigameSpriteHelper.AssignParentPositionReset(m_defaultCustomer.gameObject, base.transform.Find("Customer").gameObject);
     m_defaultCustomer.Initialize(this, p_special: false);
     m_customer = m_defaultCustomer;
 }