//セーブデータ用のバイナリ読み込み
        void Read(BinaryReader reader)
        {
            int version = reader.ReadInt32();

            if (version < 0 || version > Version)
            {
                Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, version));
                return;
            }
            reader.ReadLocalTransform(this.transform);
            reader.ReadBuffer(this.EffectColor.Read);
            reader.ReadBuffer(
                (x) =>
            {
                AdvITweenPlayer.ReadSaveData(x, this.gameObject, true, this.PixelsToUnits);
            });
            reader.ReadBuffer(
                (x) =>
            {
                AdvAnimationPlayer.ReadSaveData(x, this.gameObject, Engine);
            });

            if (version <= Version0)
            {
                return;
            }

            reader.ReadBuffer(
                (x) =>
            {
                this.TargetObject.Read(x);
            });
        }
Exemple #2
0
 //セーブデータ用のバイナリ書き込み
 public void Write(BinaryWriter writer)
 {
     writer.Write(Version);
     writer.WriteLocalTransform(this.transform);
     writer.WriteBuffer(this.EffectColor.Write);
     writer.WriteBuffer((x) => AdvITweenPlayer.WriteSaveData(x, this.gameObject));
     writer.WriteBuffer((x) => AdvAnimationPlayer.WriteSaveData(x, this.gameObject));
 }
Exemple #3
0
 //セーブデータ用のバイナリ書き込み
 public void Write(BinaryWriter writer)
 {
     writer.Write(Version);
     writer.WriteRectTransfom(this.rectTransform);
     writer.WriteBuffer(this.EffectColor.Write);
     writer.WriteBuffer((x) => AdvITweenPlayer.WriteSaveData(x, this.gameObject));
     writer.WriteBuffer((x) => AdvAnimationPlayer.WriteSaveData(x, this.gameObject));
     writer.WriteBuffer((x) => this.TargetObject.Write(x));
 }
Exemple #4
0
        internal static void ReadSaveData(BinaryReader reader, GameObject go, bool isUnder2DSpace, float pixelsToUnits, bool unscaled)
        {
            //Tweenがある場合は、Tween情報を読み込む
            int tweenCount = reader.ReadInt32();

            for (int i = 0; i < tweenCount; ++i)
            {
                AdvITweenPlayer tween = go.AddComponent <AdvITweenPlayer>();
                tween.Read(reader, isUnder2DSpace, pixelsToUnits, unscaled);
            }
        }
Exemple #5
0
 private void OnCompleteTween(AdvITweenPlayer arg)
 {
     if (arg == this)
     {
         this.count++;
         if ((this.count >= this.data.LoopCount) && !this.IsEndlessLoop)
         {
             this.Cancel();
         }
     }
 }
Exemple #6
0
 /// <summary>
 /// 再生終了時に呼ばれる
 /// </summary>
 void OnCompleteTween(AdvITweenPlayer arg)
 {
     if (arg != this)
     {
         return;
     }
     ++count;
     if (count >= this.data.LoopCount && !IsEndlessLoop)
     {
         Cancel();
     }
 }
Exemple #7
0
        //エフェクト開始時のコールバック
        protected override void OnStartEffect(GameObject target, AdvEngine engine, AdvScenarioThread thread)
        {
            if (!string.IsNullOrEmpty(tweenData.ErrorMsg))
            {
                Debug.LogError(tweenData.ErrorMsg);
                OnComplete(thread);
                return;
            }
            AdvITweenPlayer player    = target.AddComponent <AdvITweenPlayer>();
            float           skipSpeed = engine.Page.CheckSkip() ? engine.Config.SkipSpped : 0;

            player.Init(tweenData, IsUnder2DSpace(target), engine.GraphicManager.PixelsToUnits, skipSpeed, (x) => OnComplete(thread));
            player.Play();
            if (player.IsEndlessLoop)
            {
//				waitType = EffectWaitType.Add;
            }
        }
Exemple #8
0
 public void OnEffectFinalize()
 {
     Player = null;
 }