摘要:
2048 using UnityEngine;using System.Collections.Generic;public class Game : MonoBehaviour { Map map;//地图类 Card[,] mCards;//存放卡片的数组 //存放隐藏的卡牌 List<Card 阅读全文
摘要:
注:首先在Plugins文件夹下面引入三个dll文件mono.data.sqlite System.Data sqlite3 /***************************************/using UnityEngine;using System.Collections;usi 阅读全文
摘要:
static 和const修饰的变量都是静态变量; static readonly 修饰的变量是只读的 只能在定义变量的时候和静态构造方法里面给其赋值 class Weapon { public static readonly Weapon Instance; static Weapon() { I 阅读全文
摘要:
http://unity.jb51.net/chengxukaifa/kaifajingyan/1643.html 阅读全文
摘要:
首先:编写一个处理AssetsBuddle(打包资源的按钮)的编辑器按钮;脚本如下: Using UnityEngine; Using System.Collections; Using UnityEditor;//注意 要引入编辑器命名空间 Public class AssetBundleBuil 阅读全文
摘要:
Model基类: using UnityEngine;using System.Collections;/// <summary>/// Model,数据类型基类,永久存在/// </summary>public abstract class Model { //名字 public abstract 阅读全文
摘要:
Shader摄像机死亡效果 1:Shader脚本 Shader "Custom/CameraShader" { Properties { _MainTex( "MainTexture",2D )= "white" {} } SubShader { Tags{"RenderType"= "Opaque 阅读全文
摘要:
课堂练习 using System; using System.Collections.Generic; namespace Lesson13_3 { //张三:初版按钮的实现 /*class Button { public string BtnName { get; set;} public Bu 阅读全文
摘要:
委托的定义位置,可以放到类和方法同级, 也可以放到命名空间下和类同级。 委托的返回值:多播委托的返回值是最后一个方法的返回值; 匿名委托格式: Pao p = delegate(){return 0 ;}; 有参数有返回值的匿名委托: 一,用于创建有返回值类型的委托就用泛型委托;注意:返回值一定是尖 阅读全文
摘要:
《第十二讲:C#语言编程》集合 课后题: 1. (*)用集合保存4个人的随机投票,列出最终票数及各自的名字 2. (* *)在一个有限平面区域上(1000 * 1000)随机生成有序的n个点(用结构体表示点),将其保存在集合中 (1)输出所有点的坐标信息 (2)计算有序相邻两点距离之和(先排序,再求 阅读全文