浏览器中的类Unity 2D引擎
Awake()
Start()
Update()
FixedUpdate()
LateUpdate()
OnCollision(other)
OnTriggerEnter(other)
OnDestroy()
Input.GetKey(key)
Input.GetKeyDown(key)
Input.GetKeyUp(key)
Input.GetAxisRaw(axis)
Input.GetAxis(axis)
Input.mousePosition
Transform
Rigidbody2D
BoxCollider2D
CircleCollider2D
SpriteRenderer
Component
Game.createGameObject(name)
Game.Destroy(obj)
Game.Instantiate(obj)
Game.Find(name)
Game.FindWithTag(tag)
Game.FindAll(tag)
Mathf.Clamp(v, min, max)
Mathf.Lerp(a, b, t)
Mathf.Abs / Min / Max / Sign
Mathf.Sin / Cos / Atan2
Mathf.Round / Floor / Ceil
Mathf.PI / Deg2Rad / Rad2Deg
Time.deltaTime
Time.time
Time.frameCount
Color.red / green / blue / white
Color(r, g, b, a)
Vector2(x, y)
What works:
Limitations: