Beispiel #1
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;
            };
        }
Beispiel #2
0
 void Awake()
 {
     graphController = GetComponent <GraphController>();
     nodeController  = GetComponent <NodeController>();
 }
Beispiel #3
0
 void Awake()
 {
     graphController      = GetComponent <GraphController>();
     connectionController = GetComponent <ConnectionController>();
 }
 void Awake()
 {
     graphController = Graph.GetComponent <GraphController>();
 }
 void Awake()
 {
     nodeController    = GetComponent <NodeController>();
     graphController   = GetComponent <GraphController>();
     networkController = GetComponent <NetworkController>();
 }
Beispiel #6
0
 void Awake()
 {
     NodeController   = GetComponent <NodeController>();
     CameraController = GetComponent <CameraController>();
     GraphController  = GetComponent <GraphController>();
 }