Untitled
unknown
plain_text
2 years ago
664 B
8
Indexable
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PuyoFall : MonoBehaviour { void Start() { } void Update() { if (transform.position.y > -5.5) transform.Translate(0, -0.05f, 0); if (Input.GetKey(KeyCode.LeftArrow)) if (transform.position.x > -14.5) if (transform.position.y > -5.5) transform.Translate(-1, 0, 0); if (Input.GetKey(KeyCode.RightArrow)) if (transform.position.x < -9.5) if (transform.position.y > -5.5) transform.Translate(1, 0, 0); } void OnTriggerEnter (Collider other) { } }
Editor is loading...