コード例 #1
0
    public void Execute(AMTake take, bool isFrame = true, float value = 0f /* frame or time */)
    {
        if (nowPlayingTake != null)
        {
            AMTween.Stop();
        }

        take.rebind(rebindOption);

        // delete AMCameraFade
        float startFrame = value;
        float startTime  = value;

        if (!isFrame)
        {
            startFrame *= take.frameRate;                       // convert time to frame
        }
        if (isFrame)
        {
            startTime /= take.frameRate;                        // convert frame to time
        }
        take.executeActions(startFrame);
        elapsedTime    = startTime;
        takeTime       = (float)take.numFrames / (float)take.frameRate;
        nowPlayingTake = take;

        take.unbind(rebindOption);
    }
コード例 #2
0
 public void StopLoop()
 {
     if (nowPlayingTake == null)
     {
         return;
     }
     nowPlayingTake.stopAudio();
     nowPlayingTake.stopAnimations();
     nowPlayingTake = null;
     isLooping      = false;
     isPaused       = false;
     AMTween.Stop();
 }
コード例 #3
0
    public void destroy()
    {
        AMTween.Stop(this.gameObject);
        if (_tex)
        {
            if (renderTextureCamera && renderTextureCamera.targetTexture == _tex)
            {
                renderTextureCamera.targetTexture = null;
            }
            Destroy(_tex);
        }

        /*if(_matIris) {
         *      Destroy(_matIris.shader);
         *      Destroy(_matIris);
         * }*/
        _cf = null;
        Destroy(this.gameObject);
    }