示例#1
0
 public void SetEnemyDefinition(EnemyDefinition def)
 {
     maxHP               = def.HP;
     _currentHP          = maxHP;
     itemRenderer.sprite = def.imageSprite;
     flashMask.sprite    = def.imageSprite;
 }
示例#2
0
        public override Enemy SpawnNewItem(Vector3 position)
        {
            Enemy newEnemy = base.SpawnNewItem(position);

            EnemyDefinition def = possibleEnemies[Random.Range(0, possibleEnemies.Length)];

            newEnemy.SetEnemyDefinition(def);
            return(newEnemy);
        }