示例#1
0
    void Start()
    {
        chaser = GetComponent<ChasesPlayer>();
        hurt = GetComponent<Hurtable>();
        faces = GetComponent<FacesPlayer>();
        drops = GetComponent<DropsItems>();
        attacks = GetComponent<AttacksPlayer>();
        anim = GetComponent<Animator>();

        hurt.onDeath += hurt_onDeath;
        hurt.onHurt += hurt_onHurt;
    }
示例#2
0
    void Start()
    {
        anim = GetComponent<Animator>();
        dropper = GetComponent<DropsItems>();
        chaser = GetComponent<ChasesPlayer>();
        faces = GetComponent<FacesPlayer>();
        hurt = GetComponent<Hurtable>();
        hurt.onDeath += hurt_onDeath;
        hurt.onHurt += hurt_onHurt;
        audioSrc = GetComponent<AudioSource>();

        attacks = GetComponent<AttacksPlayer>();
        attacks.onPlayerDeath += attacks_onPlayerDeath;
    }
示例#3
0
    void Start()
    {
        anim = GetComponent<Animator>();
        dropper = GetComponent<DropsItems>();
        chaser = GetComponent<ChasesPlayer>();
        faces = GetComponent<FacesPlayer>();
        audSrc = GetComponent<AudioSource>();
        attacks = GetComponent<AttacksPlayer>();

        attacks.onPlayerHit += attacks_onPlayerHit;

        hurt = GetComponent<Hurtable>();
        hurt.onDeath += hurt_onDeath;

        hurt.onHurt += hurt_onHurt;

        tag = "enemy"; //For items to detect and deliver damage
    }