using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; using UnityEngine.EventSystems; using System; public class PlaceOnFloor : MonoBehaviour { public GameObject sofa; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } // Update is called once per frame public void addtoFloor() { sofa.SetActive(true); } public void plusX() { Vector3 pos = sofa.transform.position; pos.x += 5; sofa.transform.position = new Vector3(pos.x, pos.y, pos.z); } public void moinX() { Vector3 pos = sofa.transform.position; pos.x -= 5; sofa.transform.position = new Vector3(pos.x, pos.y, pos.z); } public void plusZ() { Vector3 pos = sofa.transform.position; pos.z += 5; sofa.transform.position = new Vector3(pos.x, pos.y, pos.z); } public void moinZ() { Vector3 pos = sofa.transform.position; pos.z -= 5; sofa.transform.position = new Vector3(pos.x, pos.y, pos.z); } }