using System.Collections;
using System.Collections.Generic;
using UniRx.Async;
using UnityEngine;

public class CameraMoving : DegreableObject
{
    Camera cameraObj;
    public GameObject Obj;
    public float Speed;
    void Start()
    {
        cameraObj = Camera.main;
    }

    void Update()
    {
        Move(Input.GetAxis("Horizontal") * Time.deltaTime * Speed);
    }

    private void OnGUI()
    {
        GUILayout.Label(Obj.transform.position + "");

    }

    async UniTask<string> Sdf()
    {
        while (true)
        {
            Obj.transform.position += Vector2Extensions.AngleVector2(angle).ToVector3();
            await UniTask.Delay(10);
        }
        return "";
    }

    private void OnDrawGizmos()
    {
        Gizmos.DrawLine(this.transform.position,
            this.transform.position + 1000 * Vector2Extensions.AngleVector2(angle).ToVector3());
    }
    // Update is called once per frame

}
