Пример #1
0
 private void Awake()
 {
     nodeController       = GetComponent <NodeController>();
     graphController      = GetComponent <GraphController>();
     connectionController = GetComponent <ConnectionController>();
     networkController    = GetComponent <NetworkController>();
 }
Пример #2
0
 void Awake()
 {
     networkController = GetComponent <NetworkController>();
     nodeController    = GetComponent <NodeController>();
     graphController   = GetComponent <GraphController>();
     routeController   = GetComponent <RouteController>();
 }
Пример #3
0
        private void Awake()
        {
            inputController      = GetComponent <InputController>();
            nodeController       = GetComponent <NodeController>();
            graphController      = GetComponent <GraphController>();
            connectionController = GetComponent <ConnectionController>();
            infoSpaceController  = (InfoSpaceController)Resources.FindObjectsOfTypeAll(typeof(InfoSpaceController))[0];
            consoleController    = (ConsoleWindowController)Resources.FindObjectsOfTypeAll(typeof(ConsoleWindowController))[0];
            actionController     = GetComponent <ActionController>();

            NetworkView = GetComponent <NetworkView>();

            if (inputController.Environment == Environment.Cave)
            {
                Lzwp.OnLZWPlibInitialize += Initialize;
            }
            else
            {
                Initialize();
            }
        }
Пример #4
0
        void Start()
        {
            if (Graph.GetComponent <NetworkController>().IsClient())
            {
                return;
            }
            player              = Graph.GetComponent <InputController>().Eyes.transform;
            transform.parent    = player;
            soundManager        = new SoundManager();
            AmbientAudio        = GetComponent <AudioSource>();
            AmbientAudio.clip   = soundManager.GetRandom(SoundType.AMBIENT_LOOP);
            AmbientAudio.volume = AmbientVolume;
            AmbientAudio.Play();
            SetVolume(AmbientAudio, AmbientVolume);

            nodeController                    = Graph.GetComponent <NodeController>();
            graphController                   = Graph.GetComponent <GraphController>();
            actionController                  = Graph.GetComponent <ActionController>();
            connectionController              = Graph.GetComponent <ConnectionController>();
            actionController.playSelectSound += (oldNode, newNode, source, isUndo) => {
                if (source == ActionController.NodeChangedSource.History)
                {
                    PlayStickySoundSelected(SoundType.HISTORY, isUndo ? 0 : 1);
                }
                else if (newNode != null && oldNode != null)
                {
                    PlayStickySoundRandom(SoundType.NODE_SELECTED);
                }
                else
                {
                    PlayStickySoundSelected(SoundType.FREE_FLIGHT, newNode == null ? 0 : 1);
                }
            };
            graphController.ConnectionMode.OnValueChanged += mode => PlayStickySoundSelected(SoundType.MODE, mode == ConnectionMode.CHILDREN ? 0 : 1);
            connectionController.OnScrollInDirection      += PlayScrollSounds;
            InfoSpaceController.playInfoSound             += () => {
                PlayStickySoundSelected(SoundType.INFO, isInfo ? 0 : 1);
                isInfo = !isInfo;
            };
        }
Пример #5
0
 void Awake()
 {
     graphController = GetComponent <GraphController>();
     nodeController  = GetComponent <NodeController>();
 }