Exemple #1
0
    public void SendTestNotification()
    {
        notificationNumber_++;
        GameNotificationData data;

        data.notificationTitle = notificationNumber_ + " " + notification.notificationTitle;
        data.iconSprite        = notification.iconSprite;

        GameNotificationHandler.SendGameNotification(data);
    }
Exemple #2
0
 public void TryFix(Pickup item)
 {
     if (!item.HasNameDiscovered())
     {
         GameNotificationHandler.SendGameNotification(item.GameNotificationData());
     }
     if (item.CheckType() == correctItem)
     {
         SoundManager.PlayEvent(AKID.EVENTS.ITEM_PORT_POSITIVE, gameObject);
         ambientFixedEvent.Post(gameObject);
         ambientBrokenEvent.Stop(gameObject, 100);
         Fix();
     }
     else
     {
         SoundManager.PlayEvent(AKID.EVENTS.ITEM_PORT_NEGATIVE, gameObject);
         BreakOtherRooms();
     }
 }
Exemple #3
0
    /// <summary>
    /// Breaks the provided room.
    /// True if it manages to break a room.
    /// </summary>
    /// <param name="roomNumber"> The room to break. </param>
    public bool BreakRoom(int roomNumber)
    {
        // only breaks valid room numbers
        if (roomNumber > 0 && roomNumber < rooms_.Length)
        {
            if (rooms_[roomNumber].IsFixed())
            {
                // about to break a new room so notify user.
                // fill in notification with room name and default sprite.
                GameNotificationData data;
                data.notificationTitle = rooms_[roomNumber].Name() + roomBreakNotification.notificationTitle;
                data.iconSprite        = roomBreakNotification.iconSprite;
                GameNotificationHandler.SendGameNotification(data);
            }
            rooms_[roomNumber].Break();

            return(true);
        }
        return(false);
    }