示例#1
0
        // Start is called before the first frame update
        void Start()
        {
            DontDestroyOnLoad(this);

            redEnemies.Add(GameObject.Find("Red"));
            blueEnemies.Add(GameObject.Find("Blue"));

            var eventArgs = new InitEnemyEventArgs();

            eventArgs.enemy = redEnemies[0];
            onInitRedEnemy(this, eventArgs);

            eventArgs.enemy = blueEnemies[0];
            onInitBlueEnemy(this, eventArgs);

            //StartCoroutine(generateEnemy());
        }
示例#2
0
 private void initBlueEnemy(object sender, InitEnemyEventArgs e)
 {
     BlueEnemyView       enemyView       = e.enemy.GetComponent <BlueEnemyView>();
     BlueEnemyModel      enemyModel      = new BlueEnemyModel(new EnemyEntity(blueEnemyData));
     BlueEnemyController enemyController = new BlueEnemyController(enemyModel, enemyView);
 }
示例#3
0
 private void initRedEnemy(object sender, InitEnemyEventArgs e)
 {
     RedEnemyView       enemyView       = e.enemy.GetComponent <RedEnemyView>();
     RedEnemyModel      enemyModel      = new RedEnemyModel(new EnemyEntity(redEnemyData));
     RedEnemyController enemyController = new RedEnemyController(enemyModel, enemyView);
 }