예제 #1
0
        public override bool RunScriptCommand()
        {
            bool result = true;

            try
            {
                AdventureEffectInfo adventureEffectInfo = new AdventureEffectInfo
                {
                    id = this.effectId
                };
                string     path       = "AdventureScene/Effect/" + this.effectFileName;
                GameObject original   = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject;
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
                gameObject.name             = "Effect_" + this.effectFileName;
                gameObject.transform.parent = ClassSingleton <AdventureSceneData> .Instance.scriptObjectRoot.transform;
                gameObject.SetActive(false);
                adventureEffectInfo.model    = gameObject;
                adventureEffectInfo.particle = gameObject.GetComponent <ParticleSystem>();
                adventureEffectInfo.animator = gameObject.GetComponent <Animator>();
                ClassSingleton <AdventureSceneData> .Instance.effectInfoList.Add(adventureEffectInfo);

                base.ResumeScriptEngine();
            }
            catch
            {
                result = false;
            }
            return(result);
        }
        public override bool RunScriptCommand()
        {
            bool result = false;
            AdventureEffectInfo effectInfo = ClassSingleton <AdventureSceneData> .Instance.GetEffectInfo(this.effectId);

            if (effectInfo != null)
            {
                effectInfo.model.SetActive(this.isShowFlag);
                result = true;
                base.ResumeScriptEngine();
            }
            return(result);
        }
        public override bool RunScriptCommand()
        {
            bool result = false;
            AdventureEffectInfo effectInfo = ClassSingleton <AdventureSceneData> .Instance.GetEffectInfo(this.effectId);

            if (effectInfo != null)
            {
                effectInfo.model.transform.localRotation = Quaternion.Euler(this.localEulerAngles);
                result = true;
                base.ResumeScriptEngine();
            }
            return(result);
        }
예제 #4
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);
        }