Ejemplo n.º 1
0
        /// <summary>
        /// It's used to recieve specific messages,
        /// as a way of communication between different aspects of the game.
        ///
        /// It needs to implement a method for each message defined on the enum above.
        /// </summary>
        ///
        /// <param name="message">
        /// It's a enum type, that represents the message being recieved.
        /// </param>
        public void Alert(typeOfMessage message)
        {
            switch (message)
            {
            case typeOfMessage.RecieveUIInput:
                RecieveUIInput( );
                return;

            case typeOfMessage.RecieveGameInput:
                RecieveGameInput( );
                return;

            case typeOfMessage.DefaultKeys:
                DefaultKeys( );
                return;

            case typeOfMessage.LetterMatch:
                LetterMatch( );
                return;

            case typeOfMessage.TextFailed:
                TextFailed( );
                return;

            case typeOfMessage.TextSuceed:
                TextSuceed( );
                return;

            case typeOfMessage.LevelSuceed:
                LevelSuceed( );
                return;
            }
        }
Ejemplo n.º 2
0
 public message(string textx, typeOfMessage typex)
 {
     this.text = textx;
     this.type = typex;
 }