private void Update()
 {
     //IL_0047: Unknown result type (might be due to invalid IL or missing references)
     //IL_0083: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
     if (lookAt != null)
     {
         if (Object.op_Implicit(lookAt as Transform))
         {
             _transform.LookAt(lookAt as Transform);
         }
         else
         {
             _transform.LookAt((Vector3)lookAt);
         }
     }
     if (play)
     {
         if (translate != null && translate.IsPlaying())
         {
             _transform.set_localPosition(translate.Update());
         }
         if (rotate != null && rotate.IsPlaying())
         {
             _transform.set_localEulerAngles(rotate.Update());
         }
         if (scaling != null && scaling.IsPlaying())
         {
             _transform.set_localScale(scaling.Update());
         }
     }
 }
Ejemplo n.º 2
0
    private IEnumerator DoMoveCamera(Vector3 from, Vector3 to)
    {
        //IL_0007: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0015: Unknown result type (might be due to invalid IL or missing references)
        //IL_0016: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
        Vector3Interpolator ip = new Vector3Interpolator();

        yield return((object)new WaitForSeconds(0.5f));

        Vector3 scaleBegin = playerMarker.get_localScale();
        Vector3 scaleEnd   = new Vector3(0f, 0f, 0f);

        ip.Set(0.5f, scaleBegin, scaleEnd, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0f));

        ip.Set(0.7f, from, to, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            worldMapCamera.targetPos = ip.Get();
            yield return((object)null);
        }
        RegionTable.Data targetData = openedRegionInfo[toRegionID].data;
        if (targetData != null)
        {
            playerMarker.set_localPosition(targetData.markerPos);
        }
        yield return((object)new WaitForSeconds(0.1f));

        ip.Set(0.5f, scaleEnd, scaleBegin, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0.4f));

        OnQuery_EXIT();
    }
Ejemplo n.º 3
0
 private void LateUpdate()
 {
     //IL_0037: Unknown result type (might be due to invalid IL or missing references)
     //IL_0042: Unknown result type (might be due to invalid IL or missing references)
     //IL_007f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0095: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
     //IL_0105: Unknown result type (might be due to invalid IL or missing references)
     //IL_010c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0111: Unknown result type (might be due to invalid IL or missing references)
     if (playerRotAnim.IsPlaying() && playerLoader != null && !playerLoader.isLoading)
     {
         playerLoader.get_transform().set_rotation(playerRotAnim.Update());
     }
     if (cameraPosAnim.IsPlaying())
     {
         targetCamera.set_fieldOfView(cameraFovAnim.Update());
         targetCameraTransform.set_position(cameraPosAnim.Update());
         targetCameraTransform.set_rotation(cameraRotAnim.Update());
         if (cameraTurningMode)
         {
             Vector3 val = -targetCameraTransform.get_forward();
             val.x *= parameter.cameraTargetDistance;
             val.y  = parameter.cameraHeight;
             val.z *= parameter.cameraTargetDistance;
             targetCameraTransform.set_position(val + parameter.playerPos);
         }
     }
 }
Ejemplo n.º 4
0
 private void LateUpdate()
 {
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     if (anim.IsPlaying())
     {
         _transform.set_localPosition(anim.Update());
     }
 }
Ejemplo n.º 5
0
    private IEnumerator RunScript()
    {
        Transform camera_t = MonoBehaviourSingleton <AppMain> .I.mainCameraTransform;

        for (int cmd_row = 0; cmd_row < scriptCommands.Count; cmd_row++)
        {
            string cmd = scriptCommands[cmd_row].cmd;
            string p0  = scriptCommands[cmd_row].p0;
            string p   = scriptCommands[cmd_row].p1;
            string p2  = scriptCommands[cmd_row].p2;
            string p3  = scriptCommands[cmd_row].p3;
            string msg = scriptCommands[cmd_row].msg;
            switch (cmd)
            {
            case "WAIT":
            {
                float time = (!string.IsNullOrEmpty(p0)) ? float.Parse(p0) : 0f;
                while (true)
                {
                    yield return((object)null);

                    if (time > 0f)
                    {
                        time -= Time.get_deltaTime();
                    }
                    else if (!MonoBehaviourSingleton <ResourceManager> .I.isLoading && !InstantiateManager.isBusy && !MonoBehaviourSingleton <TransitionManager> .I.isTransing && !(charas.Find((StoryCharacter o) => o.isMoving) != null) && !cameraPosAnim.IsPlaying())
                    {
                        break;
                    }
                }
                break;
            }

            case "FADE_IN":
                eventReceiver.FadeIn();
                break;

            case "FADE_OUT":
            {
                Color c = Color.get_black();
                switch (p0)
                {
                case "BLUE":
                    c = Color.get_blue();
                    break;

                case "WHITE":
                    c = Color.get_white();
                    break;

                case "RED":
                    c = Color.get_red();
                    break;

                case "YELLOW":
                    c = Color.get_yellow();
                    break;
                }
                eventReceiver.FadeOut(c);
                break;
            }

            case "CHR_EASE":
            {
                StoryCharacter.EaseDir type = (!(p == "L")) ? StoryCharacter.EaseDir.RIGHT : StoryCharacter.EaseDir.LEFT;
                bool           forward      = (!(p2 == "IN")) ? true : false;
                StoryCharacter chara        = FindChara(p0);
                if (chara != null)
                {
                    while (chara.isLoading)
                    {
                        yield return((object)null);
                    }
                    chara.PlayTween(type, forward, null);
                }
                break;
            }

            case "EFF_SHOW":
            {
                LoadObject load_obj = effectPrefabs.Get(p0);
                if (load_obj != null)
                {
                    while (load_obj.isLoading)
                    {
                        yield return((object)null);
                    }
                    Transform      effect = ResourceUtility.Realizes(load_obj.loadedObject, effectRenderTex.modelTransform, 1);
                    Vector3        pos    = Vector3.get_zero();
                    StoryCharacter chara2 = FindChara(p);
                    if (chara2 != null)
                    {
                        pos = chara2.model.get_position();
                    }
                    Vector3 position = camera_t.get_position();
                    pos.y = position.y;
                    effect.set_position(pos);
                    if (float.TryParse(p2, out float scale))
                    {
                        effect.set_localScale(new Vector3(scale, scale, scale));
                    }
                }
                break;
            }

            case "SE_PLAY":
            {
                int se_id = int.Parse(p0);
                SoundManager.PlayOneShotUISE(se_id);
                break;
            }

            case "BGM_CHANGE":
            {
                int bgm_id = int.Parse(p0);
                MonoBehaviourSingleton <SoundManager> .I.requestBGMID = bgm_id;
                break;
            }

            case "CHR_SHOW":
            {
                StoryCharacter chara5 = FindChara(p0);
                if (chara5 != null)
                {
                    while (chara5.isLoading)
                    {
                        yield return((object)null);
                    }
                    FadeCharacter(true, chara5);
                    yield return((object)new WaitForSeconds(MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.charaFadeTime));
                }
                break;
            }

            case "CHR_HIDE":
            {
                StoryCharacter chara7 = FindChara(p0);
                if (chara7 != null)
                {
                    while (chara7.isLoading)
                    {
                        yield return((object)null);
                    }
                    FadeCharacter(false, chara7);
                    yield return((object)new WaitForSeconds(MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.charaFadeTime));
                }
                break;
            }

            case "CHR_ROT":
            {
                StoryCharacter chara8 = FindChara(p0);
                if (chara8 != null)
                {
                    float angle;
                    if (string.IsNullOrEmpty(p))
                    {
                        chara8.RotateDefault();
                    }
                    else if (p == "F")
                    {
                        chara8.RotateFront();
                    }
                    else if (float.TryParse(p, out angle))
                    {
                        chara8.RotateAngle(angle);
                    }
                }
                break;
            }

            case "CHR_POSE":
            {
                StoryCharacter chara9 = FindChara(p0);
                if (chara9 != null)
                {
                    chara9.RequestPose(p);
                }
                break;
            }

            case "CHR_STAND":
            {
                StoryCharacter chara10 = FindChara(p0);
                if (chara10 != null)
                {
                    chara10.SetStandPosition(p, true);
                }
                break;
            }

            case "CHR_SCALE":
            {
                StoryCharacter chara11 = FindChara(p0);
                if (chara11 != null)
                {
                    Vector3 scale2 = new Vector3
                    {
                        x = float.Parse(p),
                        y = float.Parse(p),
                        z = float.Parse(p)
                    };
                    chara11.SetModelScale(scale2);
                }
                break;
            }

            case "CHR_FACE":
            {
                StoryCharacter chara12 = FindChara(p0);
                if (chara12 != null)
                {
                    chara12.RequestFace(p, p2);
                }
                break;
            }

            case "CAM_SET":
            {
                int camIndex2 = int.Parse(p0);
                if (0 <= camIndex2 && cameraPositions.Length > camIndex2)
                {
                    float x = float.Parse(p);
                    float y = float.Parse(p2);
                    float z = float.Parse(p3);
                    cameraPositions[camIndex2] = new Vector3(x, y, z);
                }
                break;
            }

            case "CAM_MOV":
            {
                int camIndex = int.Parse(p0);
                if (0 <= camIndex && cameraPositions.Length > camIndex)
                {
                    ((InterpolatorBase <Vector3>)cameraPosAnim).Set(0.3f, cameraPositions[camIndex], null, default(Vector3), null);
                    cameraPosAnim.Play();
                }
                break;
            }

            case "CAM_PAN":
            {
                StoryCharacter chara6 = FindChara(p0);
                if (chara6 != null)
                {
                    int charaShowCount = GetCharaShowCount();
                    switch (charaShowCount)
                    {
                    case 1:
                    {
                        Vector3 position2 = chara6.model.get_position();
                        Vector3 pos3;
                        pos3.x = position2.x;
                        Transform chara_neck = (!(p == "F")) ? Utility.Find(chara6.model, "Neck") : Utility.Find(chara6.model, "Spine01");
                        if (chara_neck != null)
                        {
                            Vector3 position3 = chara_neck.get_position();
                            pos3.y = position3.y;
                        }
                        else
                        {
                            pos3.y = initCameraPos.y;
                        }
                        if (p == "N")
                        {
                            pos3.z = MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.cameraPanNearZ;
                        }
                        else if (p == "F")
                        {
                            pos3.z = MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.cameraPanFarZ;
                        }
                        else
                        {
                            pos3.z = MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.cameraPanNormalZ;
                        }
                        ((InterpolatorBase <Vector3>)cameraPosAnim).Set(0.3f, pos3, null, default(Vector3), null);
                        cameraPosAnim.Play();
                        break;
                    }

                    case 2:
                        ((InterpolatorBase <Vector3>)cameraPosAnim).Set(0.3f, MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.duoCameraPos, null, default(Vector3), null);
                        cameraPosAnim.Play();
                        break;

                    default:
                        if (3 <= charaShowCount)
                        {
                            ((InterpolatorBase <Vector3>)cameraPosAnim).Set(0.3f, MonoBehaviourSingleton <OutGameSettingsManager> .I.storyScene.trioCameraPos, null, default(Vector3), null);
                            cameraPosAnim.Play();
                        }
                        break;
                    }
                }
                else
                {
                    Vector3 pos2;
                    pos2.x = 0f;
                    pos2.y = initCameraPos.y;
                    pos2.z = 0f;
                    ((InterpolatorBase <Vector3>)cameraPosAnim).Set(0.3f, pos2, null, default(Vector3), null);
                    cameraPosAnim.Play();
                }
                break;
            }

            case "CHR_ALIAS":
            {
                StoryCharacter chara4 = FindChara(p0);
                if (chara4 != null)
                {
                    chara4.SetAliasName(p);
                }
                break;
            }

            case "MSG":
            {
                MSG_TYPE msg_type = MSG_TYPE.NORMAL;
                if (p == "M" || p == "MONOLOGUE")
                {
                    msg_type = MSG_TYPE.MONOLOGUE;
                }
                waitMessage = true;
                StoryCharacter chara3 = FindChara(p0);
                msg = GetReplacedText(msg);
                eventReceiver.AddMessage((!(chara3 != null)) ? p0 : chara3.displayName, msg, (chara3 != null) ? chara3.dir : POS.NONE, msg_type);
                if (!string.IsNullOrEmpty(p2))
                {
                    int voice_id = int.Parse(p2);
                    SoundManager.PlayVoice(voice_id, 1f, 0u, null, null);
                }
                break;
            }

            case "BG":
            {
                bool         isFirstLoad = false;
                LoadingQueue load_queue  = new LoadingQueue(this);
                if (locationRednerTex != null)
                {
                    locationRednerTex.Release();
                }
                else
                {
                    isFirstLoad = true;
                }
                int loc_image_id = int.Parse(p0);
                int loc_sky_id   = int.Parse(p);
                ResourceManager.enableCache = false;
                LoadObject lo_loc_image = (loc_image_id <= 0) ? null : load_queue.Load(RESOURCE_CATEGORY.STORY_LOCATION_IMAGE, ResourceName.GetStoryLocationImage(loc_image_id), false);
                LoadObject lo_loc_sky   = (loc_sky_id <= 0) ? null : load_queue.Load(RESOURCE_CATEGORY.STORY_LOCATION_SKY, ResourceName.GetStoryLocationSky(loc_sky_id), false);
                yield return((object)load_queue.Wait());

                ResourceManager.enableCache = true;
                locationRednerTex           = UIRenderTexture.Get(locationTex, -1f, false, 0);
                locationRednerTex.Disable();
                locationRednerTex.orthographicSize = (float)locationTex.height * 0.5f * 0.01f;
                locationRednerTex.modelTransform.set_position(new Vector3(0f, 0f, 10f));
                locationRoot = Utility.CreateGameObject("LocationRoot", locationRednerTex.modelTransform, locationRednerTex.renderLayer);
                locationRoot.set_localPosition(new Vector3(0f, 0f, 3f));
                locationRoot.set_localScale(new Vector3(0.01f, 0.01f, 1f));
                if (lo_loc_image != null)
                {
                    locationImageRoot = Utility.CreateGameObject("LocationImageRoot", locationRoot, locationRednerTex.renderLayer);
                    locationImage     = ResourceUtility.Realizes(lo_loc_image.loadedObject, locationImageRoot, locationRednerTex.renderLayer);
                }
                if (lo_loc_sky != null)
                {
                    locationSky = ResourceUtility.Realizes(lo_loc_sky.loadedObject, locationRoot, locationRednerTex.renderLayer);
                    locationSky.set_localPosition(new Vector3(0f, 0f, 1f));
                }
                locationRednerTex.Enable(0.25f);
                if (isFirstLoad)
                {
                    eventReceiver.EndLoadFirstBG();
                }
                break;
            }
            }
            while (waitMessage)
            {
                yield return((object)null);
            }
        }
        isRunning = false;
        FocusChara(null);
        eventReceiver.EndStory();
    }
Ejemplo n.º 6
0
    private IEnumerator DoGlowRegion(Vector3 from, Vector3 to)
    {
        //IL_0007: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0015: Unknown result type (might be due to invalid IL or missing references)
        //IL_0016: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
        yield return((object)new WaitForSeconds(0.5f));

        Vector3Interpolator ip         = new Vector3Interpolator();
        Vector3             zoomDownTo = to + new Vector3(0f, 0f, -3f);

        ip.Set(1f, from, zoomDownTo, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            worldMapCamera.targetPos = ip.Get();
            yield return((object)null);
        }
        Transform toRegion = regionAreas[toRegionID];

        toRegion.get_gameObject().SetActive(true);
        Renderer toRegionRenderer = toRegion.GetComponent <Renderer>();

        toRegionRenderer.get_material().SetFloat("_Alpha", 0f);
        Renderer topRenderer = glowRegionTop.GetComponent <Renderer>();

        topRenderer.get_material().SetFloat("_Alpha", 0f);
        topRenderer.get_material().SetFloat("_AddColor", 1f);
        topRenderer.get_material().SetFloat("_BlendRate", 1f);
        topRenderer.set_sortingOrder(2);
        glowRegionTop.get_gameObject().SetActive(true);
        DelayExecute(1f, delegate
        {
            //IL_000b: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_0211: stateMachine*/)._003C_003Ef__this.mapGlowEffectA.get_gameObject().SetActive(true);
            Renderer component = ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_0211: stateMachine*/)._003C_003Ef__this.mapGlowEffectA.GetComponent <Renderer>();
            component.set_sortingOrder(1);
        });
        yield return((object)new WaitForSeconds(1f));

        ip.Set(1f, zoomDownTo, to, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            worldMapCamera.targetPos = ip.Get();
            yield return((object)null);
        }
        FloatInterpolator fip = new FloatInterpolator();

        fip.Set(2f, 0f, 1.5f, null, 0f, null);
        fip.Play();
        SoundManager.PlayOneShotUISE(SE_ID_SMOKE);
        while (fip.IsPlaying())
        {
            fip.Update();
            topRenderer.get_material().SetFloat("_Alpha", fip.Get());
            yield return((object)null);
        }
        toRegionRenderer.get_material().SetFloat("_Alpha", 1f);
        mapGlowEffectParticleA.Stop();
        mapGlowEffectB.get_gameObject().SetActive(true);
        yield return((object)new WaitForSeconds(0f));

        fip.Set(0.2f, 1f, 0f, null, 0f, null);
        fip.Play();
        while (fip.IsPlaying())
        {
            fip.Update();
            topRenderer.get_material().SetFloat("_Alpha", fip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0f));

        targetRegionIcon.get_gameObject().SetActive(true);
        TweenScale tweenScale = targetRegionIcon.GetComponent <TweenScale>();

        tweenScale.PlayForward();
        yield return((object)new WaitForSeconds(1f));

        mapGlowEffectParticleB.Stop();
        bool        isTweenEnd = false;
        UITweenCtrl tweenCtrl  = telop.GetComponent <UITweenCtrl>();

        tweenCtrl.Reset();
        tweenCtrl.Play(true, delegate
        {
            ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_04df: stateMachine*/)._003CisTweenEnd_003E__7 = true;
        });
        SoundManager.PlayOneShotUISE(SE_ID_LOGO);
        while (!isTweenEnd)
        {
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0f));

        Vector3 scaleBegin = playerMarker.get_localScale();
        Vector3 scaleEnd   = new Vector3(0f, 0f, 0f);

        ip.Set(0.5f, scaleBegin, scaleEnd, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        RegionTable.Data targetData = openedRegionInfo[toRegionID].data;
        if (targetData != null)
        {
            playerMarker.set_localPosition(targetData.markerPos);
        }
        yield return((object)new WaitForSeconds(0.1f));

        ip.Set(0.5f, scaleEnd, scaleBegin, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0.4f));

        OnQuery_EXIT();
    }