Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
664 B
5
Indexable
Never
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)
    {
    
    }

}