void Start()
    {
        character = GetComponent <CharacterController2D>();
        character.onTriggerEnterEvent += onTriggerEnterEvent;

        playerAbility = GetComponent <PlayerAbilityHandler>();
    }
Exemple #2
0
 void Start()
 {
     _info           = GetComponent <PlayerInfo>();
     _player         = GetComponent <Player>();
     _state          = GetComponent <PlayerStateMachine>();
     _rb             = GetComponent <Rigidbody>();
     _abilityHandler = GetComponent <PlayerAbilityHandler>();
 }
    // Start is called before the first frame update
    void Start()
    {
        GameObject player = GameObject.FindWithTag("Player");

        playerAbility = player.GetComponent <PlayerAbilityHandler>();

        text = GetComponent <TextMeshProUGUI>();
    }
    void Start()
    {
        _rb             = GetComponent <Rigidbody>();
        _stateMachine   = GetComponent <PlayerStateMachine>();
        _player         = GetComponent <Player>();
        _abilityHandler = GetComponent <PlayerAbilityHandler>();

        _data          = Resources.Load <AiData>("AiData"); //Retrieve AI settings from scriptedobject
        _players       = TargetContainer.Instance.Players;
        _pickups       = TargetContainer.Instance.Pickups;
        _controlPoints = TargetContainer.Instance.ControlPoints;
        _projectiles   = TargetContainer.Instance.Projectiles;
        _meteors       = TargetContainer.Instance.Meteors;
    }