Exemple #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (noDamageTime > 0)
        {
            return;
        }
        noDamageTime = 2;
        HackerPlayer player = other.gameObject.GetComponentInParent <HackerPlayer>();

        if (player != null)
        {
            player.GetComponent <HealthResource>().ChangeValue(-damageAmount);
            Debug.Log("Hacker was hit by Sawblade");
            //if (transform.parent.childCount == 1)
            //    Destroy(transform.parent.parent.gameObject);
            //else
            //    Destroy(gameObject);
        }
    }
Exemple #2
0
 public void InitHackerPlayer(HackerPlayer script, HackerHand hand)
 {
     this.hackerPlayer       = script.transform;
     this.hackerPlayerScript = script;
     this.hand = hand;
 }