This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| zyllibjs_xml | |
| XML处理 | |
| @author zyl910 | |
| 在编写处理xml的网页时,经常为浏览器兼容性头疼。于是我将常用的xml操作封装为函数。经过一段时间的改进,现在已经很稳定了,用起来很舒服。 | |
| 函数有—— | |
| xml_loadFile:xml同步/异步加载。 | |
| xml_transformNode:xsl转换。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #=============================================================================== | |
| # Filename: boost.sh | |
| # Author: Pete Goodliffe | |
| # Copyright: (c) Copyright 2009 Pete Goodliffe | |
| # Licence: Please feel free to use this, with attribution | |
| # Modified version | |
| #=============================================================================== | |
| # | |
| # Builds a Boost framework for the iPhone. | |
| # Creates a set of universal libraries that can be used on an iPhone and in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| /* | |
| Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk | |
| Copyright (c) 2015 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine.EventSystems; | |
| namespace UnityEngine.UI | |
| { | |
| [RequireComponent (typeof (Canvas))] | |
| [ExecuteInEditMode] | |
| [AddComponentMenu("Layout/Reference Resolution", 101)] | |
| public class ReferenceResolution : UIBehaviour | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // copy from http://blog.csdn.net/peng_weida/article/details/7843504 | |
| #include <stdio.h> //perror() | |
| #include <stdlib.h> | |
| #include <netdb.h> //getprotobynumber gethostbyname | |
| #include <unistd.h> //setuid() getuid() sleep() alarm() | |
| #include <sys/types.h> //getuid() | |
| #include <string.h> //bzero(s, n) 将s的前n个字节设为0 | |
| #include <signal.h> //signal() | |
| #include <time.h> //gettimeofday() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Collections; | |
| class ProcessModel : AssetPostprocessor | |
| { | |
| void OnPostprocessModel( GameObject input ) | |
| { | |
| // 只处理名为"Enemy2b"的模型 | |
| if (!input.name.Contains("Enemy2b")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class QuadTreeTest : MonoBehaviour { | |
| public class TestObject : IQuadTreeObject{ | |
| private Vector3 m_vPosition; | |
| public TestObject(Vector3 position){ | |
| m_vPosition = position; | |
| } | |
| public Vector2 GetPosition(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEditor; | |
| [InitializeOnLoad] | |
| public class ExecutionOrderManager : Editor | |
| { | |
| static ExecutionOrderManager() | |
| { | |
| foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts()) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool ZipUtils::ccCompressPvrToCCZFile(unsigned char *inBuffer,unsigned long inLength, const char *pszFileName)// inBuffer是pvr数据,inLength是pvr数据的长度 | |
| { | |
| bool bRet = false; | |
| do | |
| { | |
| if (NULL == pszFileName) { | |
| CCLOG("cocos2d: Error pszFileName NULL!"); | |
| } | |
| if(NULL == inBuffer || 0 == inLength) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| convert_img(){ | |
| for file in `ls -a $1` | |
| do | |
| if [ x"$file" != x"." -a x"$file" != x".." ];then | |
| str="$1/$file" | |
| length=${#str} | |
| sufLength=$(($length - 4)) | |
| strSuf=${str:$sufLength:$length} |
OlderNewer