// Start is called before the first frame update void Start() { myTransform = transform; GameObject manager = GameObject.Find("GameManager"); wNr = manager.GetComponent <wallsNramps>(); gs = manager.GetComponent <GoalSystem>(); }
void Awake() { Debug.Assert(Instance == null, "Singleton can only have one instance!"); Instance = this; // Let's find the current player instance in the scene and assign it here in case anyone needs access to player later Player = FindObjectOfType <Player>(); Camera = FindObjectOfType <CameraController>(); GoalSystem = this.gameObject.GetComponent <GoalSystem>(); }
void InitSystems() { _engine = new Engine(); _aiSystem = new AIThinkSystem(_engine); _inputSystem = new InputSystem(_engine); _paddleSystem = new PaddleSystem(_engine); _ballMovementSystem = new BallMovementSystem(_engine); _goalSystem = new GoalSystem(_engine); _livesSystem = new LivesSystem(_engine); _renderSystem = new RenderSystem(GameManager.GraphicsDevice, _engine); _livesSystem.RegisterEventListeners(); }