Exemplo n.º 1
0
 /// <summary>
 /// Deinitialization
 /// </summary>
 private void OnDestroy()
 {
     #region Singleton Deinitialization
     if (Instance == this)
     {
         Instance = null;
     }
     #endregion
 }
Exemplo n.º 2
0
        public Form1(IHelper aHelper)
        {
            InitializeComponent();

            Closed += Form1_FormClosed;

            iHelper = aHelper;

            iEventServer    = new EventServerUpnp();
            iListenerNotify = new SsdpListenerMulticast();
            iModelLibrary   = new ModelLibrary(iListenerNotify, iEventServer);

            iModelLibrary.EventContainerUpdated += EventContainerUpdated;
        }
Exemplo n.º 3
0
    /// <summary>
    /// Resource Initialization
    /// </summary>
    private void Awake()
    {
        #region Singleton Initialization
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Debug.LogError("More than 1 Model Library instance detected! Deleting this new one.");
            Destroy(this);
            return;
        }
        #endregion

        // Error Checks
        if (hololensModel == null)
        {
            Debug.LogError("ModelLibrary: HoloLens model not set.");
        }
        if (carModel == null)
        {
            Debug.LogError("ModelLibrary: Car model not set.");
        }
        if (engineModel == null)
        {
            Debug.LogError("ModelLibrary: Engine model not set.");
        }

        // Introduction to Networked Experiences: Exercise 14.8
        /************************************************************/
        // Get a reference to the Photon View component
        photonView = GetComponent <PhotonView>();

        // Show the hololens at the start
        ShowModel(true, false, false);

        // Save original transforms
        originalPosition = transform.position;
        originalRotation = transform.rotation;
        originalScale    = transform.localScale;
    }
 public IdentificationService()
 {
     ml = new ModelLibrary();
     ml.LoadModels();
 }