A
A
ABCquestion2022-02-05 14:02:11
Unity
ABCquestion, 2022-02-05 14:02:11

How to work with vuex-module-decorators state in components?

did not find how to connect the state with vuex-module-decorators to components and how to work with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Pavlov, 2016-01-20
@dreykk

If you have an error and want help with the error, then indicate which error is being shown.
[TelepatMode On]
I think the lesson code is old, but the Unity version is new. The new version of Unity lacks the transform, rigidbody2d and some other properties, they were removed for optimization. Create them yourself and install them like so:

public class PlayerScript : MonoBehaviour
{
    private Rigidbody2d _rigidbody2d;

    private void Start()
    {
        _rigidbody2d = GetComponent<Rigidbody2d>();
    }

    // остальной код
}

and then write _rigidbody2d everywhere instead of rigidbody2d.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question