Beispiel #1
0
    public void Start()
    {
        control = GetComponent <dfControl>();

        var isValidConfiguration =
            (JoystickType == TouchJoystickType.Trackpad && control != null) ||
            (control != null && ThumbControl != null && AreaControl != null);

        if (!isValidConfiguration)
        {
            Debug.LogError("Invalid virtual joystick configuration", this);
            this.enabled = false;
            return;
        }

        joysticks.Add(JoystickID, this);

        if (ThumbControl != null && HideThumb)
        {
            ThumbControl.Hide();
            if (DynamicThumb)
            {
                AreaControl.Hide();
            }
        }

        recenter();
    }
Beispiel #2
0
    protected override void Awake()
    {
        base.Awake();
        dfControl magnetGUI = GetComponent <dfControl>();

        magnetGUI.Hide();
    }
Beispiel #3
0
    protected void DoOnDisconnected()
    {
        base.gameObject.SetActive(this.disableWhenConnected);
        dfControl component = base.gameObject.GetComponent <dfControl>();

        if (component)
        {
            if (this.disableWhenConnected)
            {
                component.Show();
            }
            else
            {
                component.Hide();
            }
        }
    }
Beispiel #4
0
 protected virtual void initialize()
 {
     // All menus start out invisible
     owner = GetComponent<dfControl>();
     owner.Opacity = 0f;
     owner.Hide();
 }
Beispiel #5
0
    public override void HandleBonusMissed(Bonus bonus, BonusCollection collection)
    {
        dfControl magnetGUI = GetComponent <dfControl>();

        magnetGUI.Hide();
    }
 public void OnClicked()
 {
     colorToSet.Color = sourceColor.Color;
     dialog.Hide();
     PlanetControlManager.Instance.RedrawPlanet();
 }