private void CheckExit() { if (!(m_pizzaObject.transform.position.x > m_gameScreen.PizzaSpawnEnd.position.x)) { return; } if (State == mg_pt_EPizzaState.ACTIVE) { if (m_gameLogic.Order.MysteryPizza) { m_gameLogic.OnOrderCompleted(); } else { m_gameLogic.OnOrderFailed(); } } State = mg_pt_EPizzaState.INVALID; m_gameLogic.OnPizzaExit(); }
public void Reset() { m_totalCoinsSpawned = 0; m_gameLogic.Order.Reset(); SpeedModifier = 1f; State = mg_pt_EPizzaState.ACTIVE; m_toppings.ForEach(delegate(mg_pt_Topping topping) { topping.Reset(); }); m_toppings.Clear(); if (m_pizzaObject != null) { Object.Destroy(m_pizzaObject.gameObject); } m_pizzaObject = m_gameLogic.Minigame.Resources.GetInstancedResource(m_gameLogic.Order.PizzaBase).GetComponent <mg_pt_PizzaObject>(); MinigameSpriteHelper.AssignParentTransform(m_pizzaObject.gameObject, m_gameScreen.GameTransform); m_pizzaObject.transform.position = m_gameScreen.PizzaSpawnStart.position; m_sauceBeingAdded = mg_pt_EToppingType.INVALID; }