예제 #1
0
        // Initialises all components underneath master.
        public override void InitialiseAll()
        {
            base.InitialiseAll();

            particles.Initialise();

            movementController.Initialise();

            playerProperties.Initialise();

            sounds.Initialise();

            movementController.onCollision += OnPlayerHit;

            movementController.onNearMiss += OnPlayerNearMiss;

            playerProperties.onPlayerLose += OnPlayerLose;

            onMeterChanged += playerProperties.DecaySanityConstant;

            playerProperties.OnSoundChanged += sounds.AdjustAudioSourceVolume;

            onPlayerLost += sounds.StopBackgroundSound;

            movementController.onTimeChange += SetDecaySpeed;
        }
예제 #2
0
    public override void Initialise()
    {
        base.Initialise();

        GameStarted = false;

        onPlayerLost += menuManager.LoadLoseScreen;
    }
예제 #3
0
        /// <summary>
        /// Initializes the values of this instance with the provided connection and name.
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="name"></param>
        public void Initialize(Socket connection, string name)
        {
            this.id         = id_counter;
            this.name       = name;
            this.connection = connection;
            this.alive      = true;
            this.score      = 0;
            this.ready      = false;

            id_counter++;

            ReadyToggled += new ReadyToggledHandler(Player_ReadyToggled);
            PlayerLost   += new PlayerLostHandler(Player_PlayerLost);
        }
예제 #4
0
        /// <summary>
        /// Initializes the values of this instance with the provided connection and name.
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="name"></param>
        public void Initialize(Socket connection, string name)
        {
            this.id = id_counter;
            this.name = name;
            this.connection = connection;
            this.alive = true;
            this.score = 0;
            this.ready = false;

            id_counter++;

            ReadyToggled += new ReadyToggledHandler(Player_ReadyToggled);
            PlayerLost += new PlayerLostHandler(Player_PlayerLost);
        }