コード例 #1
0
ファイル: StageManager1.cs プロジェクト: jorge701/spot
 public void RemoveAlly(EntityBaseEnemy ally)
 {
     if (alliesInStage == null)
     {
         return;
     }
     alliesInStage.Remove(ally);
 }
コード例 #2
0
ファイル: StageManager1.cs プロジェクト: jorge701/spot
 public void RemoveEnemy(EntityBaseEnemy enem)
 {
     if (enemiesInStage == null)
     {
         return;
     }
     enemiesInStage.Remove(enem);
 }
コード例 #3
0
ファイル: StageManager1.cs プロジェクト: jorge701/spot
 public void RegisterAlly(EntityBaseEnemy ally)
 {
     if (alliesInStage == null)
     {
         alliesInStage = new List <EntityBaseEnemy> ();
     }
     alliesInStage.Add(ally);
 }
コード例 #4
0
ファイル: StageManager1.cs プロジェクト: jorge701/spot
 public void RegisterEnemy(EntityBaseEnemy enem)
 {
     if (enemiesInStage == null)
     {
         enemiesInStage = new List <EntityBaseEnemy> ();
     }
     enemiesInStage.Add(enem);
 }
コード例 #5
0
    GameObject InstantiateEntityGoFromPathEntityType(PathEntityType type)
    {
        GameObject ret = null;

        switch (type)
        {
        case PathEntityType.PATH_ENTITY_TYPE_PLAYER:
            ret = Instantiate(LevelCreatorEditor.Instance.GetPlayerPrefab(), Vector3.zero, Quaternion.identity);
            EntityPlayer e_p = ret.AddComponent <EntityPlayer>();
            e_p.Init(this);
            break;

        case PathEntityType.PATH_ENTITY_TYPE_BASE_ENEMY:
            ret = Instantiate(LevelCreatorEditor.Instance.GetBaseEnemyPrefab(), Vector3.zero, Quaternion.identity);
            EntityBaseEnemy e_b = ret.AddComponent <EntityBaseEnemy>();
            e_b.Init(this);
            break;
        }

        return(ret);
    }
コード例 #6
0
    public override void OnStart()
    {
        curr_enemy_lifes = enemy_lifes;
        enemy_dead       = false;
        lose             = false;

        path.ReloadPath();
        grid.ReloadGrid();

        player = (EntityPlayer)path.GetGameEntityByEntityType(EntityPathInstance.PathEntityType.PATH_ENTITY_TYPE_PLAYER);
        enemy  = (EntityBaseEnemy)path.GetGameEntityByEntityType(EntityPathInstance.PathEntityType.PATH_ENTITY_TYPE_BASE_ENEMY);

        if (player != null)
        {
            player.SetBullets(bullets);
        }

        if (enemy != null)
        {
            enemy.SetLifePoints(enemy_lifes);
        }
    }
コード例 #7
0
ファイル: StageManager1.cs プロジェクト: jorge701/spot
 public void RegisterPlayer(EntityBaseEnemy ply)
 {
     playerReference = ply;
 }