mirror of
https://github.com/ConjureETS/Labo_2_Equ_1_a15.git
synced 2026-03-24 10:01:00 +00:00
27 lines
442 B
C#
27 lines
442 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class Control : MonoBehaviour {
|
|
|
|
|
|
public Transform thingsToMove;
|
|
public int speed;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
float mouvement = Input.GetAxis ("Horizontal");
|
|
|
|
if ( mouvement!= 0)
|
|
{
|
|
thingsToMove.Translate(new Vector2(mouvement * speed, 0));
|
|
}
|
|
|
|
}
|
|
}
|