Example #1
0
    // 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>();
    }
Example #2
0
    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>();
    }
Example #3
0
        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();
        }