예제 #1
0
    public Enemy_Cube_S(string prefabName, string name, Transform parent, float health, float maxHealth)
    {
        _body        = SetForm(prefabName);
        _name        = name;
        _hitpoint    = health;
        _hitpointMax = maxHealth;
        _isAlive     = true;

        CreateAvatar(parent);

        // Assign behavior class
        //......
        damageMonitor              = Avatar.AddComponent <DamageMonitor>();
        damageMonitor.OnBulletHit += TakeDamage;
        OnDestroy += DestroySelf;
    }