RoomContainerHelper

The purpose of this class is to access the RoomContainer through this class with various extensions and perform various operations. In this way, it makes the use of the RoomContainer class more streamlined and easier.

Members

  • internal Scene Scene :

    • Class variable required to specify which scene the script is specific to and to perform operations for that class

Methods

  • public RoomContainerHelper(Scene scene)
    • Parameters:

      • scene: reference scene to determine which scene to perform operations on.

    • Scene information to be used in the operations to be performed is brought

  • public bool AddSingleton<T>(T value) where T : class
    • Parameters:

      • T: type of class to add

      • value: class to be added.

    • Calls the add method of the RoomContainer and sends the value and scene to be added to it.

    • Returns information whether it has been added or not.

  • public bool RemoveSingleton<T>(T element = null) where T : class
    • Parameters:

      • T: type of class to remove

      • element: class to be deleted

    • It calls the remove method of the RoomContainer and sends the type of the class and scene to be deleted.

    • Returns information whether it has been deleted or not

  • public T GetSingleton<T>() where T : class
    • Parameters:

      • T: type of class to call

    • It calls the Get method of the RoomContainer and sends the type of class and scene to be called.

    • The called class is returned

  • public void RegisterListener<T>(IRoomListener sceneListener) where T : IRoomListener
    • Parameters:

      • T: type of class to registered

    • It calls the registerListener method of the RoomContainer and sends the listener with the room name.

  • public void UnRegisterListener<T>(IRoomListener sceneListener) where T : IRoomListenerass
    • Parameters:

      • T: type of class to unregistered

    • It calls the unregisterListener method of the RoomContainer and sends the listener with the room name.

Last updated