using System.Collections; using AibisDream.Kit; using UnityEngine; namespace AibisDream { public class MainSceneController : Singleton { private const string RobotName = "Robot"; private const string BackName = "Back"; private const string FrontName = "Front"; private const string FixPosName = "FixPos"; private FadeSprite _robot; private SpriteRenderer _back; private SpriteRenderer _front; private Transform _fixPos; public FadeSprite Guest => _robot; protected override void Awake() { base.Awake(); var robot = transform.Find(RobotName).gameObject.GetComponent(); _robot = new FadeSprite(robot); _back = transform.Find(BackName).gameObject.GetComponent(); _front = transform.Find(FrontName).gameObject.GetComponent(); _fixPos = transform.Find(FixPosName); } public IEnumerator MoveToFix() { return _robot.MoveTo(_fixPos.position, 1); } } }