Example #1
0
    // Use this for initialization
    void Start()
    {
        _beatMachine = FindObjectOfType <BeatMachine> ();

        _image = Building.GetComponent <Image> ();

        _image.color = new Color(1, 1, 1, 0.5f);

        UpdateBuildingSprite();
    }
Example #2
0
    void Start()
    {
        _beatMachine   = FindObjectOfType <BeatMachine> ();
        _image         = GetComponent <Image> ();
        _rectTransform = GetComponent <RectTransform> ();
        _originalWidth = _rectTransform.rect.width;
        _beatWidth     = _originalWidth / _beatMachine.beatsToShow;

        Update();
    }
Example #3
0
 // Use this for initialization
 void Awake()
 {
     beatMachine = GameObject.Find("Rhythm").GetComponent<BeatMachine>();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     beatMachine           = GameObject.Find("BeatMachine").GetComponent <BeatMachine>();
     danceOffsetRandomizer = absintheLevel + Random.Range(0.0f, 1.0f);
     danceHeightRandomizer = Random.Range(0.0f, 0.8f);
 }