Exemple #1
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);
            }
        }
Exemple #2
0
 public void Fly(mg_ss_GoldenApple_FlyInfo p_flyInfo)
 {
     base.transform.position = p_flyInfo.Start;
     m_flyData = p_flyInfo;
     m_state   = mg_ss_ERotatingAppleState.FLYING;
 }