Exemplo n.º 1
0
        // Use this for initialization
        public override void Awake()
        {
            if (_instance != null)
            {
                throw new Exception("You can only create one Stage");
            }
            _instance = this;

            Name = "Stage";

            _holder = new GameObject("StageContainer");
            _clock  = new GameClock("DefaultClock");
            _holder.AddComponent <Library>();
            _holder.AddComponent <MouseInput>();

            _camera = GetComponent <Camera>();
            _camera.orthographic       = true;
            _camera.transform.position = new Vector3(0, 0, CinchOptions.CameraPos);
            _camera.tag = "MainCamera";
            _holder.transform.parent    = _camera.transform;
            RenderSettings.ambientLight = new Color(1f, 1f, 1f);

            var tweenRunner = gameObject.AddComponent <TweenRunner>();

            tweenRunner.__Init(_clock);
        }
Exemplo n.º 2
0
 public void __Init(GameClock clock)
 {
     _clock   = clock;
     _running = true;
 }