public void AddBackground(GameView inBg, Vector2 inPos) { _background = inBg; _background.SetParent(_holder); _background.SetPosition(inPos); _background.SetParent(null); _background.SetScale(SystemFacade.Renderer.CurrentResetVector); }
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); }
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; }
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); }