示例#1
0
    //
    // Update is called once per frame
    void Awake()
    {
        if (player == null)
        {
            player = GameObject.FindGameObjectWithTag("Player");
        }

        ph = player.GetComponent <plearhealth> ();

        eh.GetComponent <enmyhealth> ();
    }
示例#2
0
 private void Awake()
 {
     ph = GetComponent <plearhealth>();
     // hitpoint = ph.curthealth;
     maxhitpoint = ph.fulhealth;
 }