// Start is called before the first frame update
    void Start()
    {
        playerMovement = GetComponent <CharacterMovement2D>();
        playerInput    = GetComponent <PlayerInput>();
        playerFacing   = GetComponent <CharacterFacing2D>();

        damageable          = GetComponent <IDamageable>();
        damageable.OnDeath += OnDeath;

        //TODO: Criar sistema para trocar weapon em runtime
        if (weaponObject)
        {
            Weapon = weaponObject.GetComponent <IWeapon>();
        }
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     charFacing = GetComponent <CharacterFacing2D>();
 }