Ejemplo n.º 1
0
    void Start()
    {
        Button btn = GetComponent <Button>();

        btn.onClick.AddListener(TaskOnClick);
        gameManager = master.GetComponent <gameMoney>();
    }
Ejemplo n.º 2
0
    void Start()
    {
        //set the object renderer to allow for material changes
        rend = GetComponent <Renderer>();

        //set the start colour as... the start colour
        startColor = rend.material.color;

        gameManager = master.GetComponent <gameMoney>();
    }
Ejemplo n.º 3
0
 //allows this object to be called elsewhere
 void Awake()
 {
     inithappiness     = 50;
     maxhappiness      = 100;
     happinessmodifier = 1.0f;
     happiness         = inithappiness;
     if (instance == null)
     {
         return;
     }
     instance = this;
 }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        smallPlaying  = false;
        mediumPlaying = false;
        largePlaying  = false;

        noise  = GetComponents <AudioSource>();
        small  = noise[0];
        medium = noise[1];
        large  = noise[2];

        small.loop  = true;
        medium.loop = true;
        large.loop  = true;

        gameManager = master.GetComponent <gameMoney>();

        playMusic();
    }