Beispiel #1
0
                public static bool DictionaryShutDown(int indexAnimation, int indexParts, Script_SpriteStudio6_DataAnimation dataAnimation)
                {
                    bool flagSuccess = true;

                    flagSuccess &= StandardUncompressed.DictionaryShutDown(indexAnimation, indexParts, dataAnimation);
                    flagSuccess &= StandardCPE.DictionaryShutDown(indexAnimation, indexParts, dataAnimation);
                    flagSuccess &= CPE_Flyweight.DictionaryShutDown(indexAnimation, indexParts, dataAnimation);
                    flagSuccess &= CPE_Interpolate.DictionaryShutDown(indexAnimation, indexParts, dataAnimation);

                    return(flagSuccess);
                }
Beispiel #2
0
                public bool Start(Script_SpriteStudio6_Root instanceRoot,
                                  Script_SpriteStudio6_DataAnimation dataAnimation,
                                  int indexAnimation,
                                  int frameRangeStart,
                                  int frameRangeEnd,
                                  int frame,
                                  int framePerSecond,
                                  float rateTime,
                                  float timeDelay,
                                  bool flagPingpong,
                                  int timesPlay
                                  )
                {
                    /* Check booted-up */
                    if (0 == (Status & FlagBitStatus.VALID))
                    {
                        if (false == BootUp())
                        {
                            return(false);
                        }
                    }

                    /* Reset Animation */
                    ArgumentContainer.DataAnimation  = dataAnimation;
                    ArgumentContainer.IndexAnimation = indexAnimation;
                    ArgumentContainer.FramePrevious  = -1;

                    /* Set datas */
                    Status &= FlagBitStatus.VALID;                      /* Clear */

                    Status   = (true == flagPingpong) ? (Status | FlagBitStatus.STYLE_PINGPONG) : (Status & ~FlagBitStatus.STYLE_PINGPONG);
                    Status  &= ~FlagBitStatus.STYLE_REVERSE;
                    RateTime = rateTime;
                    if (0.0f > RateTime)
                    {
                        Status   |= (FlagBitStatus.STYLE_REVERSE | FlagBitStatus.PLAYING_REVERSE);
                        RateTime *= -1.0f;
                    }
                    FramePerSecond = framePerSecond;
                    TimePerFrame   = 1.0f / (float)FramePerSecond;

                    FrameStart = frameRangeStart;
                    FrameEnd   = frameRangeEnd;
                    if (0 != (Status & FlagBitStatus.PLAYING_REVERSE))
                    {                           /* Play-Reverse */
                        if (FrameStart >= frame)
                        {
                            frame = FrameEnd + 1;
                        }
                    }
                    else
                    {                           /* Play-Foward */
                        if ((FrameEnd + 1) <= frame)
                        {
                            frame = FrameStart - 1;
                        }
                    }
                    ArgumentContainer.Frame = frame;

                    TimesPlay = timesPlay;
                    TimeDelay = timeDelay;

                    CountLoop      = 0;
                    TimeElapsed    = (ArgumentContainer.Frame - FrameStart) * TimePerFrame;
                    TimeElapsedNow = 0.0f;
//					ArgumentContainer.Frame = Mathf.Clamp(ArgumentContainer.Frame, FrameStart, FrameEnd);

                    Status |= FlagBitStatus.PLAYING;
                    Status |= FlagBitStatus.PLAYING_START;

                    FrameRange = (FrameEnd - FrameStart) + 1;
                    TimeRange  = (float)FrameRange * TimePerFrame;
                    TimePerFrameConsideredRateTime = TimePerFrame * RateTime;

                    TimeElapseReplacement        = 0.0f;
                    TimeElapseInRangeReplacement = 0.0f;

                    return(true);
                }
Beispiel #3
0
 public override void OnInspectorGUI()
 {
     EditorGUILayout.LabelField("[SpriteStudio Animation-Data]");
     Script_SpriteStudio6_DataAnimation Data = (Script_SpriteStudio6_DataAnimation)target;
 }