// Start is called before the first frame update
    void Start()
    {
        _textCom   = GetComponent <TextMeshProUGUI>();
        _countDown = GameObject.FindGameObjectWithTag(CustomTags.GameManger).GetComponent <GameCountDown>();

        Debug.Assert(_countDown != null);
    }
예제 #2
0
//-----------------------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------------------
    void Awake()
    {
        gameManager    = GameObject.FindGameObjectWithTag("GameManager");
        player         = GameObject.FindGameObjectWithTag("Player");
        countDown      = gameManager.GetComponent <GameCountDown> ();
        pointerSeconds = transform.Find("rotation_axis_pointer_seconds").gameObject;
        pointerMinutes = transform.Find("rotation_axis_pointer_minutes").gameObject;
        pointerHours   = transform.Find("rotation_axis_pointer_hour").gameObject;

        msecs   = 0.0f;
        seconds = 0;
        GameObject feedbackObject = GameObject.FindGameObjectWithTag("Feedback");

        feedback = feedbackObject.GetComponent <Text>();
    }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        if (playerLife == null)
        {
            playerLife = GameObject.FindGameObjectWithTag(CustomTags.Player).GetComponent <LifeAmount>();
        }

        if (gameTimeCountDown == null)
        {
            gameTimeCountDown = GetComponent <GameCountDown>();
        }

        if (faceRecogniser == null)
        {
            faceRecogniser = GetComponent <FaceRecogniser>();
        }

        if (score == null)
        {
            score = GetComponent <Score>();
        }

        if (distance == null)
        {
            distance = GetComponent <Distance>();
        }

        if (backgroundVideo == null)
        {
            backgroundVideo = GameObject.FindGameObjectWithTag(CustomTags.Background).GetComponent <VideoPlayer>();
            Debug.Assert(backgroundVideo != null);
        }

        if (dude == null)
        {
            dude = GameObject.FindGameObjectWithTag(CustomTags.Dude);
        }

        _countDownObvs = new GameCountDownObvs(this);
        _lifeObvs      = new LifeObvs(this);
        playerLife.Subject.AddObvs(_lifeObvs);
        gameTimeCountDown.Subject.AddObvs(_countDownObvs);

        _speed = 0.5f;
    }
예제 #4
0
    Vector2 baseJ;     //x: minJ, y:minJ


    void Awake()
    {
        gameManager    = GameObject.FindGameObjectWithTag("GameManager");
        countDown      = gameManager.GetComponent <GameCountDown> ();
        teleporterList = new ArrayList();
    }