public static UnityEngine.Bounds Convert(Oultrox.Common.UnityEngineReplacement.Bounds rBounds) { return(new UnityEngine.Bounds( Convert(rBounds.center), Convert(rBounds.size) )); }
public Entity AddBounds(Oultrox.Common.UnityEngineReplacement.Bounds newBounds) { var component = CreateComponent <Oultrox.EntitasPong.Entitas.Components.GameState.BoundsComponent>(ComponentIds.Bounds); component.bounds = newBounds; return(AddComponent(ComponentIds.Bounds, component)); }
// ------------------ Methods override protected void Awake() { base.Awake(); Debug.Log("GameController.Awake()"); GameController.OnDestroying += GameController_OnDestroying; TickController.Instantiate(); AudioController.Instantiate(); InputController.Instantiate(); ViewController.Instantiate(); ResourceController.Instantiate(); Application.targetFrameRate = 30; _screenBounds = UnityEngineReplacementUtility.Convert(GameUtility.GetOrthographicBounds(Camera.main)); SetupPools(); SetupPoolObserver(); //order matters //1 - Systems that depend on entities will internally listen for entity creation before reacting - nice! SetupSystems(); //2 SetupEntities(); //place a ball in the middle of the screen w/ velocity _pool.CreateEntity().willStartNextRound = true; }
public Entity AddView(object newGameObject, Oultrox.Common.UnityEngineReplacement.Bounds newBounds) { var component = CreateComponent <Oultrox.Common.Entitas.Components.Render.ViewComponent>(ComponentIds.View); component.gameObject = newGameObject; component.bounds = newBounds; return(AddComponent(ComponentIds.View, component)); }