Exemplo n.º 1
0
        public void TidyUp()
        {
            InputManager.RemoveCamera(m_camera);
            InputManager.Unsubscribe(TouchEvent.ON_TOUCH_START, m_onTouchStart);
            InputManager.Unsubscribe(TouchEvent.ON_TOUCH_DOWN, m_onTouchDown);
            InputManager.Unsubscribe(TouchEvent.ON_TOUCH_UP, m_onTouchEnd);
            InputManager.Unsubscribe(TouchEvent.ON_SWIPE_END, m_onSwipeEnd);
            mg_SmoothieSmash active = MinigameManager.GetActive <mg_SmoothieSmash>();

            if (active != null)
            {
                active.InputObserver.SteeringChangedEvent -= OnInputObserverSteeringChanged;
            }
        }
Exemplo n.º 2
0
        public void FlyApplesFly(mg_SmoothieSmash p_minigame)
        {
            Camera  mainCamera = MinigameManager.GetActive().MainCamera;
            Vector2 start      = new Vector2(0f - mainCamera.aspect * mainCamera.orthographicSize, mainCamera.orthographicSize);

            start.x /= p_minigame.transform.lossyScale.x;
            start.x -= -0.714f;
            start.y /= p_minigame.transform.lossyScale.y;
            start.y -= 1.16f;
            mg_ss_GoldenApple_FlyInfo p_flyInfo = default(mg_ss_GoldenApple_FlyInfo);

            p_flyInfo.Start            = start;
            p_flyInfo.Target           = m_playerObject.transform.position;
            p_flyInfo.Target.y        -= 0.2f * p_minigame.transform.lossyScale.y;
            p_flyInfo.TotalFlyTime     = 1f;
            p_flyInfo.RemainingFlyTime = 1f;
            mg_ss_GoldenApple_RotateInfo p_rotateInfo = default(mg_ss_GoldenApple_RotateInfo);

            p_rotateInfo.StartingAngle = 4.712389f;
            p_rotateInfo.CurrentAngle  = p_rotateInfo.StartingAngle;
            p_rotateInfo.RotateTime    = 1f;
            p_rotateInfo.MaxTurns      = 1f;
            p_rotateInfo.Radius        = 1.5f;
            p_rotateInfo.Offset        = 0.2f * p_minigame.transform.lossyScale.y;
            float num = 0.2f;

            for (int i = 0; i < 5; i++)
            {
                GameObject instancedResource = p_minigame.Resources.GetInstancedResource(mg_ss_EResourceList.GAME_GOLDEN_APPLE_ROTATE);
                MinigameSpriteHelper.AssignParentTransform(instancedResource, p_minigame.transform);
                mg_ss_GoldenAppleRotationObject component = instancedResource.GetComponent <mg_ss_GoldenAppleRotationObject>();
                component.Fly(p_flyInfo);
                component.RotateAround(p_rotateInfo);
                component.Delay((float)i * num);
                m_apples.Add(component);
            }
        }
Exemplo n.º 3
0
 public void Initialize(mg_ss_ConveyorLogic p_conveyorLogic, mg_ss_GameScreen p_screen, mg_SmoothieSmash p_minigame)
 {
     m_conveyorLogic  = p_conveyorLogic;
     m_splatterObject = p_screen.SplatterObject;
     m_splatterObject.Initialize(p_screen.BlobSplatterFinish, p_minigame.MainCamera);
     m_transformParent  = p_conveyorLogic.Conveyor;
     m_resources        = p_minigame.Resources;
     m_spawnedItems     = new List <mg_ss_ItemObject>();
     m_highlightTypes   = new List <mg_ss_EItemTypes>();
     m_spawnTop         = p_conveyorLogic.ItemSpawnPoint_Top;
     m_spawnBottom      = p_conveyorLogic.ItemSpawnPoint_Bottom;
     m_screenHalfWidth  = p_minigame.MainCamera.aspect * p_minigame.MainCamera.orthographicSize;
     m_screenHalfHeight = p_minigame.MainCamera.orthographicSize;
 }
Exemplo n.º 4
0
 public mg_ss_TitleLogic(mg_ss_ITitleScreen p_TitleScreen)
 {
     Minigame      = MinigameManager.GetActive <mg_SmoothieSmash>();
     m_titleScreen = p_TitleScreen;
 }
Exemplo n.º 5
0
 public mg_ss_InstructionLogic()
 {
     m_minigame = MinigameManager.GetActive <mg_SmoothieSmash>();
 }