eb指南中的Sprite动画(社区版) [英] Sprite animation in eb guide (community ed)

查看:93
本文介绍了eb指南中的Sprite动画(社区版)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个精灵动画(类似于沙漏)。我找不到办法,但是有脚本命令 f:animation_play 。如何使用它连续显示多张图片(如幻灯片)?我必须作为参数传递什么?

I want to create a sprite animation (similar to an hourglass). I found no way to do that, but there are script commands f: animation_play. How can I use this to show multiple pictures in a row (like a slideshow)? What do I have to pass as a parameter?

我搜索了guide studio的手册,只找到了脚本功能,而没有找到如何使用它。

I searched the manual of guide studio and found only the script function, but not how to use it.

推荐答案

您可以使用动画属性来显示幻灯片(即不同的图像):

You can show a slideshow (i.e. different images) by using an animated property:


  1. 向视图添加图像小部件(此处为显示动画的视图1。将图像命名为 Sprite

  • 向图像小部件添加两个属性:


    • 键入图像列表,将其命名为 sprite

    • 键入 Integer ,将其命名为 spriteIdx

      1. Add an image widget to the view (here: "View 1" where the animation shall be shown. Name the image Sprite.
      2. Add two properties to the image widget:
        • Type Image list, name it e.g. sprite
        • Type Integer, name it e.g. spriteIdx

      • 选择查看1(不是数据池)

      • 选择 spriteIdx Sprite

      • Select "View 1" (not Data pool)
      • Choose spriteIdx which is below Sprite

      • 开始= 0

      • 结束=图片数量(不是-1)

      • 设置持续时间,重复,根据需要交替


      • 向图像 Sprite
      • 添加条件脚本类型的属性
      • 脚本源可以是:

      function(v:arg0::bool)
      {
         if (!v:arg0)
         {
             f:trace_string("Play")
             f:animation_play(v:this->"Animation 1")
         }
         false
      }
      




      • f:animation_play的参数是参考向在步骤5中创建的 Animated属性

      • 添加触发事件;或者您可以例如进入状态时开始动画(使用进入动作

        • the parameter of f:animation_play is the reference to the Animated property created in step 5
        • add a trigger event; alternatively you could e.g. start the animation when entering the state (with an entry action)
        • 这篇关于eb指南中的Sprite动画(社区版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆