Пример #1
0
    void Start()
    {
        config = GetComponent <EnemyPrefabConfig> ();
        model  = config.enemyModel;
        view   = config.enemyView;

        model.SetMaxHealth(config.maxHealth);
    }
Пример #2
0
 public void Init()
 {
     gameObject = new GameObject();
     gameObject.AddComponent <EnemyModel>();
     model     = gameObject.GetComponent <EnemyModel>();
     maxHealth = 100;
     model.SetMaxHealth(maxHealth);
 }