Ejemplo n.º 1
0
 void Awake()
 {
     camera     = transform.Find("Camera").GetComponent <Camera>();
     UIPhases   = transform.Find("UI Phases").gameObject;
     circleWipe = transform.Find("UI Overlay/CircleWipe").GetComponent <CircleWipe>();
     UISounds   = transform.Find("UI Sounds").GetComponents <AudioSource>();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     camera = transform.Find("Camera").GetComponent<Camera>();
     UIPhases = transform.Find("UI Phases").gameObject;
     circleWipe = transform.Find("UI Overlay/CircleWipe").GetComponent<CircleWipe>();
     UISounds = transform.Find("UI Sounds").GetComponents<AudioSource>();
 }
Ejemplo n.º 3
0
    void Awake()
    {
        // Initialize lap and checkpoint values

        curLap = new int[2] {
            0, 0
        };
        curCheckpoint = new int[2] {
            -1, -1
        };
        curProgress = new int[2] {
            -1, -1
        };
        boostProgress = new int[2] {
            0, 0
        };
        checkpointCount = checkpointList.transform.childCount;
        checkpointLogic = transform.Find("CheckpointLogic").gameObject;

        // Get all the UI elements

        redOverlay          = transform.Find("UI/RedOverlay").gameObject.GetComponent <Image>();
        blueOverlay         = transform.Find("UI/BlueOverlay").gameObject.GetComponent <Image>();
        redOverlay.enabled  = true;
        blueOverlay.enabled = true;

        winnerCrown        = transform.Find("UI/WinnerPanel/WinnerCrown").gameObject.GetComponent <WinnerCrownController>();
        redLapPanel        = transform.Find("UI/RedLapPanel").gameObject.GetComponent <Image>();
        blueLapPanel       = transform.Find("UI/BlueLapPanel").gameObject.GetComponent <Image>();
        redLapText         = transform.Find("UI/RedLapPanel/LapText").gameObject.GetComponent <Text>();
        blueLapText        = transform.Find("UI/BlueLapPanel/LapText").gameObject.GetComponent <Text>();
        redCurrentLapText  = transform.Find("UI/RedLapPanel/CurrentLapText").gameObject.GetComponent <Text>();
        blueCurrentLapText = transform.Find("UI/BlueLapPanel/CurrentLapText").gameObject.GetComponent <Text>();

        redLose      = transform.Find("UI/RedLose").gameObject.GetComponent <Image>();
        blueLose     = transform.Find("UI/BlueLose").gameObject.GetComponent <Image>();
        circleWipe   = transform.Find("UI/CircleWipe").gameObject.GetComponent <CircleWipe>();
        levelEnd     = transform.Find("UI/LevelEnd").gameObject.GetComponent <RectTransform>();
        levelEndText = levelEnd.gameObject.GetComponentsInChildren <Text>();
        levelEnd.gameObject.SetActive(false);

        redLose.enabled  = true;
        blueLose.enabled = true;
        redLose.CrossFadeAlpha(0F, 0F, true);
        blueLose.CrossFadeAlpha(0F, 0F, true);

        audioLogic      = transform.Find("AudioLogic").gameObject.GetComponent <AudioController>();
        squids          = transform.Find("Spawn").gameObject.GetComponentsInChildren <SquidController>();
        cameras         = transform.Find("Spawn").gameObject.GetComponentsInChildren <Camera>();
        crossHairPlanes = transform.Find("UI/CrosshairPlanes").gameObject.GetComponentsInChildren <Image>();
        crossHairs      = transform.Find("UI/Crosshairs").gameObject.GetComponentsInChildren <Image>();
    }
Ejemplo n.º 4
0
    void Awake()
    {
        // Initialize lap and checkpoint values

        curLap = new int[2] {0, 0};
        curCheckpoint = new int[2] {-1, -1};
        curProgress = new int[2] {-1, -1};
        boostProgress = new int[2] {0, 0};
        checkpointCount = checkpointList.transform.childCount;
        checkpointLogic = transform.Find("CheckpointLogic").gameObject;

        // Get all the UI elements

        redOverlay = transform.Find("UI/RedOverlay").gameObject.GetComponent<Image>();
        blueOverlay = transform.Find("UI/BlueOverlay").gameObject.GetComponent<Image>();
        redOverlay.enabled = true;
        blueOverlay.enabled = true;

        winnerCrown = transform.Find("UI/WinnerPanel/WinnerCrown").gameObject.GetComponent<WinnerCrownController>();
        redLapPanel = transform.Find("UI/RedLapPanel").gameObject.GetComponent<Image>();
        blueLapPanel = transform.Find("UI/BlueLapPanel").gameObject.GetComponent<Image>();
        redLapText = transform.Find("UI/RedLapPanel/LapText").gameObject.GetComponent<Text>();
        blueLapText = transform.Find("UI/BlueLapPanel/LapText").gameObject.GetComponent<Text>();
        redCurrentLapText = transform.Find("UI/RedLapPanel/CurrentLapText").gameObject.GetComponent<Text>();
        blueCurrentLapText = transform.Find("UI/BlueLapPanel/CurrentLapText").gameObject.GetComponent<Text>();

        redLose = transform.Find("UI/RedLose").gameObject.GetComponent<Image>();
        blueLose = transform.Find("UI/BlueLose").gameObject.GetComponent<Image>();
        circleWipe = transform.Find("UI/CircleWipe").gameObject.GetComponent<CircleWipe>();
        levelEnd = transform.Find("UI/LevelEnd").gameObject.GetComponent<RectTransform>();
        levelEndText = levelEnd.gameObject.GetComponentsInChildren<Text>();
        levelEnd.gameObject.SetActive(false);

        redLose.enabled = true;
        blueLose.enabled = true;
        redLose.CrossFadeAlpha(0F, 0F, true);
        blueLose.CrossFadeAlpha(0F, 0F, true);

        audioLogic = transform.Find("AudioLogic").gameObject.GetComponent<AudioController>();
        squids = transform.Find("Spawn").gameObject.GetComponentsInChildren<SquidController>();
        cameras = transform.Find("Spawn").gameObject.GetComponentsInChildren<Camera>();
        crossHairPlanes = transform.Find("UI/CrosshairPlanes").gameObject.GetComponentsInChildren<Image>();
        crossHairs = transform.Find("UI/Crosshairs").gameObject.GetComponentsInChildren<Image>();
    }