Ejemplo n.º 1
0
 void Start()
 {
     canvasHandler = FindObjectOfType <CanvasHandler>();
     gridHandler   = FindObjectOfType <GridHandler>();
     enemy         = FindObjectOfType <Enemy>();
     StartCoroutine(SelfDestruct());
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     _instance    = this;
     lineRenderer = GetComponent <LineRenderer>();
     SatelliteButtons.SetActive(false);
     SatelliteToggles.SetActive(false);
     lineRenderer.positionCount = 2;
 }
Ejemplo n.º 3
0
 void Awake()
 {
     if (name.Equals("CanvasMain"))
     {
         main         = this;
         Canvas       = GetComponent <Canvas>();
         CanvasScaler = GetComponent <CanvasScaler>();
     }
 }
Ejemplo n.º 4
0
 public override void Awake()
 {
     base.Awake();
     if (!EnforceSingleton(CanvasHandler.I))
     {
         return;
     }
     CanvasHandler.I = this;
 }
Ejemplo n.º 5
0
 void Start()
 {
     canvasHandler = FindObjectOfType <CanvasHandler>();
     StartCoroutine(MoveEnemy());
 }
Ejemplo n.º 6
0
 void Start()
 {
     canvasHandler = GetComponent <CanvasHandler>();
     LessonDB      = lessonDB.GetComponent <LessonDB>();
 }
Ejemplo n.º 7
0
 void Start()
 {
     canvasHandler = FindObjectOfType <CanvasHandler>();
 }
Ejemplo n.º 8
0
 public void OnAwake()
 {
     generatorEvent = Toolbox.GetManager <GeneratorEventManager>();
     mainCanvas     = FindObjectOfType <CanvasHandler>();
 }
Ejemplo n.º 9
0
    // The very start of the program
    public IEnumerator InitApplication()
    {
        // basic initialization
        Screen.fullScreen           = false;
        appState                    = AppState.Initializing;
        Application.targetFrameRate = targetFrameRate;

        userManager     = GetComponentInChildren <UserManager>();
        playbackManager = GetComponentInChildren <PlaybackManager>();
        scenarioEvents  = GetComponentInChildren <ScenarioEvents>();

        networkManager = (NetworkManager)FindObjectOfType(typeof(NetworkManager));
        osc            = networkManager.osc;

        uiHandler     = (UIHandler)FindObjectOfType(typeof(UIHandler));
        canvasHandler = uiHandler.GetComponentInChildren <CanvasHandler>();

        fileInOut    = (FileInOut)FindObjectOfType(typeof(FileInOut));
        soundHandler = (SoundHandler)FindObjectOfType(typeof(SoundHandler));
        clock        = (Clock)FindObjectOfType(typeof(Clock));

        canvasHandler.ChangeCanvas("initCanvas");
        //_userRole = UserRole.Server; // base setting
        int t = 0;

        switch (_userRole)
        {
        case UserRole.Server: { t = 0; break; }

        case UserRole.Player: { t = 1;; break; }

        case UserRole.Viewer: { t = 2;; break; }

        case UserRole.Tracker: { t = 3;; break; }

        case UserRole.Playback: { t = 4; break; }
        }

        // load jsons
        fileInOut.LoadPreferencesFiles(this);

        if (gameData.runInLocal == 1)
        {
            gameData.OSC_LocalIP = "127.0.0.1";
        }
        else
        {
            gameData.OSC_LocalIP = CheckIp();
        }

        // change UI's server IP field
        uiHandler.FillServerIPField(gameData.runInLocal, gameData.OSC_ServerIP);

        userManager.keepNamesVisibleForPlayers = (gameData.showNamesAboveHead == 1);


        // adjust user's parameters

        // build is always for non vr use
        if (!Application.isEditor)
        {
            useVRHeadset = false;
            StartCoroutine(EnableDisableVRMode(false));
        }
        else
        {
            useVRHeadset = (gameData.useVr == 1);
            StartCoroutine(EnableDisableVRMode(false));
        }

        if (useVRHeadset)
        {
            uiHandler.SetPlayerNetworkType(1);
        }
        else
        {
            uiHandler.SetPlayerNetworkType(t);
        }

        // do we print sent and received messages
        if (gameData.DebugMode == 1)
        {
            Instantiate(debugPrefab);
            debugMode = true;
        }
        yield return(new WaitForSeconds(1));

        InvokeRepeating("TimedUpdate", 0.5f, 1f / targetFrameRate);
    }
Ejemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     canvasHandler  = FindObjectOfType <CanvasHandler>();
     movePos.parent = null;
     bombReference  = null;
 }
Ejemplo n.º 11
0
 private void Awake()
 {
     canvas        = FindObjectOfType <Canvas>();
     canvasHandler = canvas.GetComponent <CanvasHandler>();
 }
Ejemplo n.º 12
0
 //Paints graph
 private void CanvasViewPaintSurface(object sender, SKPaintSurfaceEventArgs e)
 {
     CanvasHandler.CanvasDraw(e, stock1, stock2, extended, doubleGraphScale);
 }