当前位置: 首页>>代码示例>>C#>>正文


C# com.getKey方法代码示例

本文整理汇总了C#中com.getKey方法的典型用法代码示例。如果您正苦于以下问题:C# com.getKey方法的具体用法?C# com.getKey怎么用?C# com.getKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com的用法示例。


在下文中一共展示了com.getKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: loadTimelineKeys

 private static void loadTimelineKeys(List<XmlNode> keys, 
     com.discobeard.spriter.dom.TimeLine timeline)
 {
     for (int i = 0; i < keys.Count; i++)
     {
         XmlNode k = keys[i];
         XmlNode obj = XmlReader.getChildByName(k, "bone");
         com.discobeard.spriter.dom.Key key = new com.discobeard.spriter.dom.Key();
         key.setId(XmlReader.getInt(k,"id" ));
         key.setSpin(XmlReader.getInt(k,"spin", 1));
         key.setTime(System.Convert.ToInt64(XmlReader.getInt(k,"time", 0 )));
         string name = XmlReader.getAttribute(k.ParentNode, "name");
         timeline.setName(name);
         if (obj != null)
         {
             com.discobeard.spriter.dom.Bone bone = new com.discobeard.spriter.dom.Bone();
             bone.setAngle(new java.math.BigDecimal(XmlReader.getFloat(obj,"angle", 0f )));
             bone.setX(new java.math.BigDecimal(XmlReader.getFloat(obj,"x", 0f )));
             bone.setY(new java.math.BigDecimal(XmlReader.getFloat(obj,"y", 0f )));
             bone.setScaleX(new java.math.BigDecimal(XmlReader.getFloat(obj,"scale_x", 1f )));
             bone.setScaleY(new java.math.BigDecimal(XmlReader.getFloat(obj,"scale_y", 1f )));
             key.setBone(bone);
         }
         else
         {
             com.discobeard.spriter.dom.AnimationObject @object = new com.discobeard.spriter.dom.AnimationObject
                 ();
             obj = XmlReader.getChildByName(k, "object");
             @object.setAngle(new java.math.BigDecimal(XmlReader.getFloat(obj,"angle", 0f )));
             @object.setX(new java.math.BigDecimal(XmlReader.getFloat(obj,"x", 0f )));
             @object.setY(new java.math.BigDecimal(XmlReader.getFloat(obj,"y", 0f )));
             @object.setScaleX(new java.math.BigDecimal(XmlReader.getFloat(obj,"scale_x", 1f )));
             @object.setScaleY(new java.math.BigDecimal(XmlReader.getFloat(obj,"scale_y", 1f )));
             @object.setFolder(XmlReader.getInt(obj,"folder" ));
             @object.setFile(XmlReader.getInt(obj,"file" ));
             com.discobeard.spriter.dom.File f = data.getFolder()[@object.getFolder()].getFile
                 ()[@object.getFile()];
             @object.setPivotX(new java.math.BigDecimal(XmlReader.getFloat(obj,"pivot_x", f.getPivotX( ))
                 ));
             @object.setPivotY(new java.math.BigDecimal(XmlReader.getFloat(obj,"pivot_y", f.getPivotY( ))
                 ));
             key.getObject().Add(@object);
         }
         timeline.getKey().Add(key);
     }
 }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:46,代码来源:SCMLReader.cs

示例2: loadMainlineKeys

        private static void loadMainlineKeys(List<XmlNode
			> keys, com.discobeard.spriter.dom.MainLine main)
        {
            for (int i = 0; i < keys.Count; i++)
            {
                XmlNode k = keys[i];
                com.discobeard.spriter.dom.Key key = new com.discobeard.spriter.dom.Key();
                key.setId(XmlReader.getInt(k,"id" ));
                int time = XmlReader.getInt(k, "time", -1);
                if (time == -1) key.setTime(0);
                else key.setTime(System.Convert.ToInt64(time));
                main.getKey().Add(key);
                loadRefs(XmlReader.getChildrenByName(k, "object_ref"), XmlReader.getChildrenByName(k, "bone_ref"), key);
            }
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:15,代码来源:SCMLReader.cs


注:本文中的com.getKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。