Exemple #1
0
    public void Show()
    {
        gameObject.SetActive(true);

        Reposition();

        FuncX.SetFunc(Bot.Mover.FunctonX.Code);
        FuncY.SetFunc(Bot.Mover.FunctonY.Code);
        ColorButton.SetColor(Bot.Painter.Color);
        RotationButton.SetRotation(Bot.Mover.Rotation);
        TextureButton.SetBrush(Bot.Painter.BrushTexture);

        ActiveToggle.isOn                = Bot.Mover.Moving;
        FuncX.OnFunctionSelected        += OnFuncX;
        FuncY.OnFunctionSelected        += OnFuncY;
        ColorButton.OnColorChange       += OnColorChange;
        TextureButton.OnTextureChange   += OnTextureChange;
        RotationButton.OnRotationChange += OnRotationChange;
        ActiveToggle.onValueChanged.AddListener(a => Bot.Mover.Moving = a);        //smelly
    }