コード例 #1
0
 private void OnEnable()
 {
     if (control == null)
     {
         control = new ControlsMaster();
         control.Player.UIAccept.performed += UIAccept;
     }
     control.Player.Enable();
 }
コード例 #2
0
    void OnEnable()
    {
        if (controlsMaster == null)
        {
            controlsMaster = new ControlsMaster();
            controlsMaster.Player.Activate.performed += Toggle;
        }

        controlsMaster.Player.Enable();
    }
コード例 #3
0
    private void Awake()
    {
        _input = new ControlsMaster();
        if (_layersToSuck == 0)
        {
            Debug.LogWarning("Layers To Suck as not been set, which may cause problems!");
        }

        _particleSystem = GetComponent <ParticleSystem>();
        _particleSystem.Stop();
    }
コード例 #4
0
    private void OnEnable()
    {
        if (controlsMaster == null)
        {
            controlsMaster = new ControlsMaster();
            controlsMaster.Player.Move.performed += Move;
            controlsMaster.Player.Move.canceled  += Move;
            controlsMaster.Player.Move.canceled  += context => movement = Vector2.zero;
        }

        controlsMaster.Player.Enable();
    }
コード例 #5
0
 // Start is called before the first frame update
 private void Awake()
 {
     controls = new ControlsMaster();
 }
コード例 #6
0
 private void Awake()
 {
     _input = new ControlsMaster();
     _sortingLayerInsideVaccum = SortingLayer.NameToID("BehindVaccum");
 }