zoukankan      html  css  js  c++  java
  • 2D TOOLKIT备忘录

    • 通过Clip名称更改动画片段
    1         // 通过clip名称获取clip实例
    2         tk2dSpriteAnimationClip clip = childrenAnimator.GetClipByName("J1_Idle");
    3         // 通过clip实例的frames成员得到第一帧对象tk2dSpriteAnimationFrame
    4         tk2dSpriteAnimationFrame firstFrame = clip.frames[0];
    5         // 通过tk2dSpriteAnimationFrame的spriteCollection成员得到tk2dSpriteCollectionData对象
    6         // 通过tk2dSpriteAnimationFrame的spriteId成员得到frame对应的sprite的Id
    7         childrenAnimator.SetSprite(firstFrame.spriteCollection, firstFrame.spriteId);
    • 通过Animation名称指定Animator的Library
    1         var _ins_animation = Resources.Load<tk2dSpriteAnimation>("JA 1");
    2         foreach (var c in _ins_animation.clips) ZSLoger.Instance.Loger.DebugFormat("clip in _ins_animation clips = {0}", c.name);
    3         ZSLoger.Instance.Loger.DebugFormat("use tk2dSystem init tk2dSpriteAnimation prefab that name is 'JA', then object name = {0}", _ins_animation.name);
    4         childrenAnimator.Library = _ins_animation;
  • 相关阅读:
    session_id 生成原理
    压缩后的数据 要经过 base64_encode 后才能在网络上传送
    MySQL ANALYZE TABLE
    mysql 优化2
    mysql 查询优化
    第归调用
    『GoLang』函数
    『GoLang』控制结构
    『GoLang』语法基础
    『Python』装饰器
  • 原文地址:https://www.cnblogs.com/linxmouse/p/7801963.html
Copyright © 2011-2022 走看看