예제 #1
0
    // Use this for initialization
    void Start()
    {
        networkManager = GameObject.Find("NetworkManager").GetComponent <NetworkManager>();

        beatCounter = GameObject.Find("BeatCounter").GetComponent <BeatCounter>();
        beatCounter.Start();

        height = Camera.main.orthographicSize * 2.0f;
        startX = Camera.main.orthographicSize * Screen.width / Screen.height;
        transform.localScale = new Vector2(transform.localScale.x, height);
        transform.position   = new Vector2(-startX, 0.0f);
    }
예제 #2
0
    public BeatCounter GetBeatCounter()
    {
        if (GameObject.Find("BeatCounter") == null)
        {
            Debug.LogError("Impossible de trouver l'objet BeatCounter dans la scène");
            return(null);
        }
        BeatCounter o = GameObject.Find("BeatCounter").GetComponent <BeatCounter>();

        if (!o.isStart)
        {
            o.Start();
        }
        return(o);
    }