public override void DamageEnemy(int damageAmount) { base.DamageEnemy(damageAmount); SlugEnemyAttributes attributes = ((SlugAI)ai).attributes; attributes.distanceBias = Mathf.Min(attributes.distanceBias * 1.1f, 1f); attributes.dot1Bias = Mathf.Max(attributes.dot1Bias * 0.5f, attributes.distanceBias * 0.5f); ai.Alert(); }
// Start is called before the first frame update new void Start() { base.Start(); attributes = Instantiate(attributes); baseAttributes = Instantiate(attributes); }