using Assets.StreetLight.Scripts; using System; using System.Linq; using UnityEngine; namespace Assets.Pong { public class Bumper : MonoBehaviour { public bool isBump1; public float speed = 5f; PersonManager PersonManager => personManagerLazy.Value; Lazy personManagerLazy; private void Awake() { personManagerLazy = new Lazy(FindObjectOfType); } void Update() { if (PersonManager.Persons.Count == 1) { var person = PersonManager.Persons.Single(); //if (isBump1) //{ // transform.Translate(0f, Input.GetAxis("Vertical") * speed * Time.deltaTime, 0f); //} //else //{ // //transform.Translate(0f, Input.GetAxis("Vertical2") * speed * Time.deltaTime, 0f); //} } } } }