public void ToLevelSelect(int P_selected)
    {
        count = count + P_selected;
        if (count > 1 && add == 0)
        {
            StaticLevel.GetComponent <Button>().interactable  = true;
            StaticLevel.GetComponent <Image>().color          = Color.white;
            FallingLevel.GetComponent <Button>().interactable = true;
            FallingLevel.GetComponent <Image>().color         = Color.white;

            //CharacterCanvas.GetComponent<MainMenuScript>().btns.Add(StaticLevel.GetComponent<Button>());
            // CharacterCanvas.GetComponent<MainMenuScript>().btns.Add(FallingLevel.GetComponent<Button>());
            Lamp1.GetComponent <SpriteRenderer>().color = Color.white;
            Lamp2.GetComponent <SpriteRenderer>().color = Color.white;
            add = 1;
        }
        else if (count < 2)
        {
            StaticLevel.GetComponent <Button>().interactable  = false;
            StaticLevel.GetComponent <Image>().color          = Color.gray;
            FallingLevel.GetComponent <Button>().interactable = false;
            FallingLevel.GetComponent <Image>().color         = Color.gray;
            add = 0;
            //CharacterCanvas.GetComponent<MainMenuScript>().btns.RemoveAt(4);
            //CharacterCanvas.GetComponent<MainMenuScript>().btns.Remove(StaticLevel.GetComponent<Button>());
            //  CharacterCanvas.GetComponent<MainMenuScript>().btns.Remove(FallingLevel.GetComponent<Button>());
            // CharacterCanvas.GetComponent<MainMenuScript>().btns.RemoveAt(5);
            Lamp1.GetComponent <SpriteRenderer>().color = Color.gray;
            Lamp2.GetComponent <SpriteRenderer>().color = Color.gray;
        }
    }
    public void Start()
    {
        //MM = GameObject.Find("MM");
        //Foxy = GameObject.Find("Foxy");
        //Pen = GameObject.Find("Pen");
        //Butt = GameObject.Find("Butt");

        StaticLevel = GameObject.Find("StaticButton");
        //StaticLevel.GetComponent<Button>().interactable = false;
        StaticLevel.GetComponent <Image>().color = Color.gray;

        FallingLevel = GameObject.Find("FallingButton");
        //FallingLevel.GetComponent<Button>().interactable = false;
        FallingLevel.GetComponent <Image>().color = Color.gray;

        Lamp1.GetComponent <SpriteRenderer>().color = Color.gray;
        Lamp2.GetComponent <SpriteRenderer>().color = Color.gray;
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        manager = UduinoManager.Instance;
        manager.pinMode(AnalogPin.A2, PinMode.Input);
        Lock1        = false;
        Lock2        = false;
        picRotCheck1 = false;
        picRotCheck2 = false;
        picRotCheck3 = false;

        Lamp1Script = Lamp1Access.GetComponent <Lamp1>();
        Lamp2Script = Lamp2Access.GetComponent <Lamp2>();
        Lamp3Script = Lamp3Access.GetComponent <Lamp3>();
        Lamp4Script = Lamp4Access.GetComponent <Lamp4>();

        BlueDoorScript = BlueDoorAccess.GetComponent <BlueDoor>();
        RedDoorScript  = RedDoorAccess.GetComponent <RedDoor>();
    }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     Lamp2Script = Lamp2Access.GetComponent <Lamp2>();
     lampstate   = false;
 }