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


C# TargetType类代码示例

本文整理汇总了C#中TargetType的典型用法代码示例。如果您正苦于以下问题:C# TargetType类的具体用法?C# TargetType怎么用?C# TargetType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: NativeFieldInfo

        public NativeFieldInfo(TargetType type, string name, int index,
					bool has_const_value, int const_value)
            : base(type, name, index, false, TargetMemberAccessibility.Public,
				0, 0, has_const_value)
        {
            this.const_value = const_value;
        }
开发者ID:baulig,项目名称:debugger,代码行数:7,代码来源:NativeStructType.cs

示例2: TargetAuraMinTimeLeftCondition

 public TargetAuraMinTimeLeftCondition(TargetType target, int auraId, TimeSpan minTimeLeft)
 {
     Target = target;
     AuraId = auraId;
     CreatorGuid = StyxWoW.Me.Guid;
     MinTimeLeft = minTimeLeft;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetAuraMinTimeLeftCondition.cs

示例3: WithDest

        public Network WithDest(string dest)
        {
            _destType = GetTargetType(dest);
            _dest = dest;

            return this;
        }
开发者ID:kostyll,项目名称:FFmpegSharp,代码行数:7,代码来源:Network.cs

示例4: DtsTask

 public DtsTask(SourceType sourceType, string sourceName, TargetType targetType, ITarget target)
 {
     SourceType = sourceType;
     SourceName = sourceName;
     TargetType = targetType;
     Target = target;
 }
开发者ID:suh786,项目名称:dts.server,代码行数:7,代码来源:DtsTask.cs

示例5: clear

	private void clear()
	{
		targetType = TargetType.Type_Null;
		targetArrived = null;
		goTarget = null;

	}
开发者ID:wuzhangwuzhang,项目名称:BWM,代码行数:7,代码来源:RunToTarget.cs

示例6: CMakeTarget

 public CMakeTarget(TargetType type, bool isImported)
 {
     Type = type;
     IMPORTED = isImported;
     sources = new HashSet<FileInfo>();
     properties = new CMakeTargetPropertyCollection();
 }
开发者ID:chen-charles,项目名称:GraphicalCMake,代码行数:7,代码来源:CMakeTarget.cs

示例7: TargetAuraMaxTimeLeftCondition

 public TargetAuraMaxTimeLeftCondition(TargetType target, int auraId, WoWGuid creatorGuid, TimeSpan maxTimeLeft)
 {
     Target = target;
     AuraId = auraId;
     CreatorGuid = creatorGuid;
     MaxTimeLeft = maxTimeLeft;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetAuraMaxTimeLeftCondition.cs

示例8: Item

 public Item(string name, string desc, ItemType type, TargetType targetType)
 {
     _name = name;
     _desc = desc;
     _type = type;
     _targetType = targetType;
 }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:Item.cs

示例9: Initialize

 public void Initialize (Transform targ, TargetType targType, float maxTTL, float expRadius, float dmg ) {
     target = targ;
     targetType = targType;
     maxTimeToLive = maxTTL;
     explosionRadius = expRadius;
     damage = dmg;
 }
开发者ID:genelikespie,项目名称:AR_Game_Winter2016,代码行数:7,代码来源:MissileProjectile.cs

示例10: TargetInfo

 public TargetInfo(string name, string target, TargetType type, bool safe)
 {
     this.name = name;
     this.target = target;
     this.type = type;
     this.safe = safe;
 }
开发者ID:Spanfile,项目名称:BackupUtil,代码行数:7,代码来源:Structs.cs

示例11: GetBestTarget

 public static Obj_AI_Hero GetBestTarget(TargetType type, float range)
 {
     var List = HeroManager.Enemies.Where(x => !x.IsDead && x.Distance(Player.Position) <= range);
     if (type == TargetType.LowestHealth)
     {
         return List.OrderBy(x => x.Health).FirstOrDefault();
     }
     if (type == TargetType.MaxHealth)
     {
         return List.OrderBy(x => x.MaxHealth).FirstOrDefault();
     }
     if (type == TargetType.BestDamage)
     {
         return List.OrderBy(x => x.TotalMagicalDamage + x.TotalAttackDamage ).LastOrDefault();
     }
     if (type == TargetType.Closest)
     {
         return List.OrderBy(x => x.Distance(Player.Position)).FirstOrDefault();
     }
     if (type == TargetType.Tankiest)
     {
         return List.OrderBy(x => x.Armor + x.FlatMagicReduction).FirstOrDefault();
     }
     if (type == TargetType.MostHealth)
     {
         return List.OrderBy(x => x.Health).LastOrDefault();
     }
     else return TargetSelector.GetTarget(range, TargetSelector.DamageType.Physical);
 }
开发者ID:LSharpAura,项目名称:LeagueSharp,代码行数:29,代码来源:Spells.cs

示例12: MonoVariable

        public MonoVariable(string name, TargetType type, bool is_local, bool is_byref,
				     Method method, VariableInfo info, int start_scope_offset,
				     int end_scope_offset)
            : this(name, type, is_local, is_byref, method, info)
        {
            if (is_local) {
                start_scope = method.StartAddress + start_scope_offset;
                end_scope = method.StartAddress + end_scope_offset;
            } else if (method.HasMethodBounds) {
                start_scope = method.MethodStartAddress;
                end_scope = method.MethodEndAddress;
            } else {
                start_scope = method.StartAddress;
                end_scope = method.EndAddress;
            }

            if (has_liveness_info) {
                if (start_liveness < start_scope)
                    start_liveness = start_scope;
                if (end_liveness > end_scope)
                    end_liveness = end_scope;
            } else {
                start_liveness = start_scope;
                end_liveness = end_scope;
                has_liveness_info = true;
            }
        }
开发者ID:baulig,项目名称:debugger,代码行数:27,代码来源:MonoVariable.cs

示例13: IsValidTarget

    public static bool IsValidTarget(TargetType targetType, GameObject target, GameObject me)
    {
        Team targetTeam = target.GetComponent<Team>();
        Team myTeam = me.GetComponent<Team>();

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        switch (targetType) {
          case TargetType.Self:
        if(target == me) {
          return true;
        }
        break;
          case TargetType.Ally:
        if(myTeam.m_teamNumber == targetTeam.m_teamNumber) {
          return true;
        }
        break;
          case TargetType.Enemy:
        if(myTeam.m_teamNumber != targetTeam.m_teamNumber) {
          return true;
        }
        break;
          case TargetType.All:
        return true;
          default:
        return false;
        };
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        return false;
    }
开发者ID:shawnmiller,项目名称:Capstone,代码行数:30,代码来源:Team.cs

示例14: CategoriesToTreeNodes

        /// <summary>
        /// 将分类类别转换为TreeNodes
        /// </summary>
        /// <param name="categoryService">扩展类:CategoryService</param>
        /// <param name="categories">要转换成节点分类集合</param>
        /// <param name="targetType">点击分类时打开新页还是在本页打开</param>
        /// <param name="idPrefix">节点ID前缀</param>
        /// <param name="checkedCategoryId">当前选中的CategoryId</param>
        /// <param name="openLevel">默认打开的层级</param>
        /// <returns>TreeNodes列表</returns>
        public static IList<TreeNode> CategoriesToTreeNodes(this CategoryService<Category> categoryService, IList<Category> categories, TargetType targetType, string idPrefix, long? checkedCategoryId, int? openLevel)
        {
            //本方法将分类转换成TreeNodes,其中,哪些节点展开还是闭合的逻辑较为复杂,如下:
            //关于哪些节点展开哪些节点闭合,逻辑实现如下:
            //1 首先,若checkedCategoryId有值,则这个分类的所有父级分类展开,其他分类全部折叠;
            //2 其次,若checkedCategoryId无值,openLevel有着,则深度小于等于openLevel的分类展开,其他分类折叠;
            //3 若若checkedCategoryId和openLevel都没有值,则所有分类折叠。

            IList<TreeNode> nodes = new List<TreeNode>();
            if (categories != null && categories.Count > 0)
            {
                //若当前有选中的分类,则获取其所有的父级分类Id集合
                List<long> checkedCategoryIds = new List<long>();
                if (checkedCategoryId.HasValue && checkedCategoryId.Value > 0)
                    GetParentCategoryIDs(categoryService, checkedCategoryId.Value, checkedCategoryIds);

                //通过Category组装TreeNode
                foreach (Category category in categories)
                {
                    TreeNode node = new TreeNode();
                    node.Id = idPrefix + category.CategoryId.ToString();
                    node.IsChecked = (checkedCategoryId == category.CategoryId);
                    node.IsOpened = IsOpenedNode(category, checkedCategoryIds, openLevel);
                    node.IsParent = category.ChildCount > 0;
                    node.Name = category.CategoryName;
                    node.ParentId = idPrefix + category.ParentId.ToString();
                    node.Target = targetType;
                    node.Url = string.Empty;
                    nodes.Add(node);
                }
            }
            return nodes;
        }
开发者ID:hbulzy,项目名称:SYS,代码行数:43,代码来源:CategoryServiceExtensions.cs

示例15: TargetHasAuraMinStacksCondition

 public TargetHasAuraMinStacksCondition(TargetType target, int auraId, int minStackCount)
 {
     Target = target;
     AuraId = auraId;
     MinStackCount = minStackCount;
     CreatorGuid = StyxWoW.Me.Guid;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetHasAuraMinStacksCondition.cs


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