Exemplo n.º 1
0
    protected virtual void Start()
    {
        hive = GameObject.FindObjectOfType <HiveBehaviour>();
        hive.AddCreatureToHive(this);

        startPosition = GetStartingPosition();
    }
Exemplo n.º 2
0
    void Start()
    {
        PanelController panel = transform.GetComponent <PanelController>();

        panel.UpdateMe += UpdateMe;

        timer = FindObjectOfType <TimerScript>();
        hive  = FindObjectOfType <HiveBehaviour>();
    }
Exemplo n.º 3
0
    void Start()
    {
        PanelController panel = transform.GetComponent <PanelController>();

        panel.UpdateMe += UpdateMe;

        hungry       = 0;
        eatCountdown = 0.0f;
        this.panel   = panel.panel;

        ResetLines();
        hive = FindObjectOfType <HiveBehaviour>();
    }
Exemplo n.º 4
0
    void Start()
    {
        PanelController panel = transform.GetComponent <PanelController>();

        panel.UpdateMe += UpdateMe;
        //foreach(string name in foodColors.GetNames())
        //{
        //    Debug.Log(name);
        //}
        colorSelection.SetList(foodColors.GetNames());
        shapeSelection.SetList(foodShapes.GetNames());
        spiceSelection.SetList(foodSpices.GetNames());
        colorSelection.UpdateSmth = UpdateDisplay;
        shapeSelection.UpdateSmth = UpdateDisplay;
        spiceSelection.UpdateSmth = UpdateDisplay;
        dispenser.onClick.AddListener(DispensePress);
        this.panel = panel.panel;

        hive  = FindObjectOfType <HiveBehaviour>();
        timer = FindObjectOfType <TimerScript>();
        UpdateDisplay();
    }
Exemplo n.º 5
0
    void Start()
    {
        freeCrossHairs = new Queue <int>();
        usedCrossHairs = new Queue <int>();
        crossHairs     = new List <GameObject>();
        PanelController panel = transform.GetComponent <PanelController>();

        panel.UpdateMe += UpdateMe;

        hive = FindObjectOfType <HiveBehaviour>();

        colorSelection.SetList(laserColors.GetNames());
        shoot.onClick.AddListener(ToggleShoot);

        for (int i = 0; i < 50; ++i)
        {
            freeCrossHairs.Enqueue(i);
            crossHairs.Add(Instantiate(CrossHairPrefab));
            crossHairs[crossHairs.Count - 1].transform.SetParent(transform);
            crossHairs[crossHairs.Count - 1].SetActive(false);
        }
        toggleImage.sprite = toggleOff;
    }