摘要:
Lua代码: human = { age = 0, __newindex = function (t,k,v) if(k == "age") then print("age 变化了") human.age = v else print("其他属性变化了") end end} coco = { --a 阅读全文
摘要:
1:元表与元方法 a={name = "a name" , age = "a age 18"} b={} setmetatable(b,a) 测试001: print(a.age) > a age 18 print(b.age) > nil 测试002: a.__index = a print(a. 阅读全文
摘要:
1:元表与元方法 测试001: student = { name = "cocotang", id = 10001, calss = "math",}function student:SayHello(name)print("student say hello to : "..name)end hu 阅读全文
摘要:
using UnityEngine;using System.Collections.Generic; public class JudgePoint : MonoBehaviour{ //多边形A 所有顶点 private float[,] dingdian = new float[4, 3] { 阅读全文