コード例 #1
0
        public bool SetTargetStageLocator(string locatorName, bool isFollowingFlag)
        {
            bool flag = AdventureObject.SetLocator(this.cameraAnimator.transform, ClassSingleton <AdventureSceneData> .Instance.stage.transform, locatorName, isFollowingFlag);

            if (flag)
            {
                if (!isFollowingFlag)
                {
                    this.cameraAnimator.transform.parent = this.adventureSceneRootTransform;
                }
                this.camera3D.transform.LookAt(this.cameraAnimator.transform);
            }
            return(flag);
        }
コード例 #2
0
        public override bool RunScriptCommand()
        {
            bool flag = false;
            AdventureDigimonInfo digimonInfo = ClassSingleton <AdventureSceneData> .Instance.GetDigimonInfo(this.charaId);

            if (digimonInfo != null)
            {
                flag = AdventureObject.SetLocator(digimonInfo.model.transform, ClassSingleton <AdventureSceneData> .Instance.stage.transform, this.stageLocatorName, this.isFollowingFlag);
                if (flag)
                {
                    base.ResumeScriptEngine();
                }
            }
            return(flag);
        }
コード例 #3
0
        public override bool RunScriptCommand()
        {
            bool flag = true;
            AdventureEffectInfo effectInfo = ClassSingleton <AdventureSceneData> .Instance.GetEffectInfo(this.effectId);

            if (effectInfo != null)
            {
                if ("stage" == this.locatorType)
                {
                    flag = AdventureObject.SetLocator(effectInfo.model.transform, ClassSingleton <AdventureSceneData> .Instance.stage.transform, this.locatorName, this.isFollowingFlag);
                }
                else if ("chara" == this.locatorType)
                {
                    AdventureDigimonInfo digimonInfo = ClassSingleton <AdventureSceneData> .Instance.GetDigimonInfo(this.charaId);

                    if (digimonInfo != null)
                    {
                        flag = AdventureObject.SetLocator(effectInfo.model.transform, digimonInfo.model.transform, this.locatorName, this.isFollowingFlag);
                    }
                }
                else
                {
                    Quaternion localRotation = effectInfo.model.transform.localRotation;
                    Vector3    localPosition = effectInfo.model.transform.localPosition;
                    Vector3    localScale    = effectInfo.model.transform.localScale;
                    effectInfo.model.transform.parent        = ClassSingleton <AdventureSceneData> .Instance.adventureCamera.camera3D.transform;
                    effectInfo.model.transform.localScale    = localScale;
                    effectInfo.model.transform.localPosition = localPosition;
                    effectInfo.model.transform.localRotation = localRotation;
                }
            }
            if (flag)
            {
                base.ResumeScriptEngine();
            }
            return(flag);
        }