示例#1
0
        public static bool IsTargetType(int skilltgttype, UnitRoleType targettype)
        {
            bool res = false;

            if ((skilltgttype & (1 << (int)(targettype))) != 0)
            {
                res = true;
            }

            return(res);
        }
示例#2
0
文件: UnitType.cs 项目: chengxu-yh/ET
        public static UnitRoleType GetRoleType(string roletype)
        {
            UnitRoleType res = UnitRoleType.Land;

            switch (roletype.ToLower())
            {
            case "land":
                res = UnitRoleType.Land;
                break;

            case "sky":
                res = UnitRoleType.Sky;
                break;
            }
            return(res);
        }