/// <summary> /// 播放动画 /// </summary> /// <param name="animName">Animation name.</param> /// <param name="loop">If set to <c>true</c> loop.</param> public override void playAnim(string animName, bool loop = false) { base.playAnim(animName, loop); SpritePlayer sprite = getPlayerSprite(); sprite.playAnim(animName, loop); }
/// <summary> /// 读档初始化精灵 /// </summary> public void loadInitSprite() { SpritePlayer sprite = getPlayerSprite(); // 恢复循环动画 foreach (string animName in this.loopAnimNames) { sprite.playAnim(animName, true); } }