Exemple #1
0
    void Awake()
    {
        _rgbd2d  = GetComponent <Rigidbody2D>();
        _attacks = GetComponent <Attacks>();

        GameObject go = new GameObject();

        go.name             = "Controller";
        go.transform.parent = this.transform;

        _jsm = go.AddComponent <JoyStickManager>();
        _jsm.Reset(playerNumber - 1);

        _transform = this.GetComponent <Transform>();
        _anim      = this.GetComponent <Animator>();

        _inventory = this.GetComponent <Items.Inventory>();

        _movementBlocked = false;
        _movementSlowed  = false;
        _jumpBlocked     = false;
    }