示例#1
0
    private bool dying = false; // needed for revenge, or else death will run with hurt, which will animate a destroyed object

    #region Initialization

    void Awake()
    {
        myRenderer  = GetComponent <SpriteRenderer>();
        audioSource = GetComponent <AudioSource>();
        animator    = GetComponent <Animator>();
        health      = initialHealth;
        InfoHolder  = FindObjectOfType <InforUI>();
    }
示例#2
0
 private void Awake()
 {
     rb         = this.GetComponent <Rigidbody2D>();
     main       = Camera.main;
     InfoHolder = FindObjectOfType <InforUI>();
 }