コード例 #1
0
 public void AddBackground(GameView inBg, Vector2 inPos)
 {
     _background = inBg;
     _background.SetParent(_holder);
     _background.SetPosition(inPos);
     _background.SetParent(null);
     _background.SetScale(SystemFacade.Renderer.CurrentResetVector);
 }
コード例 #2
0
        public GameView CreateChild(string inName)
        {
            var child = new GameView(this._application, inName);

            child.SetParent(this.transform);
            child.SetScale(Vector2.one);
            child.SetPosition(Vector2.zero);
            Children.Add(child);
            return(child);
        }
コード例 #3
0
        public void AddLevel(GameView inLevel, Vector2 inPos)
        {
            _level = inLevel;
            _level.SetParent(this._holder);
            _level.SetPosition(inPos);
            _level.SetScale(SystemFacade.Renderer.ResetVector);

            //- add level collider
            var collider = Object.Instantiate(_config.levelCollider, this._holder);

            collider.transform.localPosition = inPos;
            collider.transform.localScale    = SystemFacade.Renderer.ResetVector;
        }
コード例 #4
0
        public void AddView(GameView inView, Vector2 inPosition)
        {
            if (!_views.ContainsKey(inView.name))
            {
                _views.Add(inView.name, new List <GameView>());
            }
            if (_views[inView.name] == null)
            {
                _views[inView.name] = new List <GameView>();
            }

            inView.index = _views[inView.name].Count;
            _views[inView.name].Add(inView);

            inView.SetParent(this._holder);
            inView.SetPosition(inPosition);
        }