// Use this for initialization
 void Start()
 {
     _body = GameObject.Find("SnowRiceField").GetComponent <LargeEnemy>();
     _spriteMeshInstance = this.gameObject.GetComponent <SpriteMeshInstance>();
     _bone2D             = _spriteMeshInstance.bones[0];
     _roat = _bone2D.transform.rotation;
     _pos  = _bone2D.transform.position;
 }
Пример #2
0
    void OnTriggerEnter(Collider hitInfo)
    {
        Debug.Log("IsHitting");
        Destroy(this.gameObject);
        Enemy enemy = hitInfo.GetComponent <Enemy>();

        if (enemy != null)
        {
            enemy.TakeDamage(damage);
        }
        LargeEnemy largeEnemy = hitInfo.GetComponent <LargeEnemy>();

        if (largeEnemy != null)
        {
            largeEnemy.TakeDamage(damage);
        }
    }
Пример #3
0
 private void Start()
 {
     _largeEnemy = GetComponentInParent <LargeEnemy>();
 }