1.简单的位移,以及动画播放using UnityEngine;using System.Collections;public class ClickToMove : MonoBehaviour { public float speed; public CharacterControll...
分类:
其他好文 时间:
2015-06-04 11:35:36
阅读次数:
92
1.类似英雄联盟的相机控制using UnityEngine;using System.Collections;public class CameraCntrl : MonoBehaviour { public float camSpeed = 1; public int GUIsize...
分类:
其他好文 时间:
2015-06-04 11:30:56
阅读次数:
118
1.java中的8种原生数据类型
1)整形:使用int表示
2)字节型:使用byte表示
3)短整型:使用short表示
4)长整形:使用long表示
5)单精度浮点型:使用float表示。所谓浮点型,指的就是小树,也叫做实数,比如1.2
6)双精度浮点型:使用double表示。双进度浮点型表示的数据范围要比单精度浮点型大
7)字符型:使用char表示。(char是charact...
分类:
编程语言 时间:
2015-06-04 09:57:55
阅读次数:
194
自己写的一个Timer,绑定到一个prefab上,使用时直接Instantaite,要用几个就Instantiate几个,非常方便using UnityEngine;
using System.Collections;public class Timer : MonoBehaviour
{
private float _time;
private float _lastTime;...
分类:
编程语言 时间:
2015-06-03 21:48:56
阅读次数:
148
using UnityEngine;
using System.Collections;
public class TweenFlipCARDS : MonoBehaviour
{
private float mfTime = 1.0f;
public GameObject positive;//牌正面
public GameObject reverse;//牌背面...
分类:
编程语言 时间:
2015-06-03 19:41:59
阅读次数:
209
1 /** 2 * 根据手机的分辨率从 dp 的单位 转成为 px(像素) 3 */ 4 public int dipTopx(Context context, float dpValue) { 5 final float scale = ...
分类:
移动开发 时间:
2015-06-03 19:33:26
阅读次数:
135
#import //创建一个学生变量typedef struct student{ char name[20]; //姓名 int age; //年龄 float weight; //体重 float height; //身高 float score; //分数 }Stu;//为什...
分类:
编程语言 时间:
2015-06-03 19:03:30
阅读次数:
157
1、阅读并运行下面的示例程序,掌握标准输入输出流的控制
例1
#include
#include
using namespace std;
int main()
{
float a,b,c,disc;
cout<>a>>b>>c;
if (a==0)
cerr<...
分类:
编程语言 时间:
2015-06-03 17:45:51
阅读次数:
179
1.只要求保留N位不四舍5入 float f = 0.55555f; int i =(int)(f * 100); f = (float)(i*1.0)/100;2.保留N位,四舍五入 . decimal d= decimal.Round(decimal.Parse( "0.55555 "),2);...
1 边界和湖心小岛分别算一个节点,连接所有距离小于D的鳄鱼,时间复杂度O(N2)
2 判断每个连通图的节点中是否包含边界和湖心小岛,是则Yes否则No
3 冗长混乱的函数参数
#include
#include
#include
#include
using namespace std;
struct Coordinate
{
float x;
float...
分类:
其他好文 时间:
2015-06-03 09:52:39
阅读次数:
147