public SpawnSpiderGroupWaveAction(string spPoint, List <AIAction> leader, List <AIAction> attack, List <AIAction> infect, FormationType form, int[] col, float iniDel = 0f, SpiderAIBehaviour.SpawnAnimation spawnAnim = SpiderAIBehaviour.SpawnAnimation.FLOOR)
    {
        spawnPointName = spPoint;
        leaderActions  = leader;
        attackActions  = attack;
        infectActions  = infect;
        initialDelay   = iniDel;
        formation      = form;
        colors         = col;
        spawnAnimation = spawnAnim;
        spiderIndex    = 0;

        enemyMng = rsc.enemyMng;


        switch (formation)
        {
        case FormationType.ROLLING:
            followersActions = new List <AIAction>[4] {
                null, enemyMng.rolling, enemyMng.rolling, enemyMng.rolling
            };
            break;

        case FormationType.THREE_FRONT:
            followersActions = new List <AIAction>[4] {
                null, enemyMng.three_front_1, enemyMng.three_front_2, enemyMng.three_front_3
            };
            break;

        case FormationType.THREE_BACK:
            followersActions = new List <AIAction>[4] {
                null, enemyMng.three_back_1, enemyMng.three_back_2, enemyMng.three_back_3
            };
            break;

        case FormationType.TRIANGLE:
            followersActions = new List <AIAction>[5] {
                null, enemyMng.triangle_1, enemyMng.triangle_2, enemyMng.triangle_3, enemyMng.triangle_4
            };
            break;

        case FormationType.QUAD:
            followersActions = new List <AIAction>[5] {
                null, enemyMng.quad_1, enemyMng.quad_2, enemyMng.quad_3, enemyMng.quad_4
            };
            break;

        default:
            break;
        }

        groupInfo = new EnemyGroupInfo();
        groupInfo.followersCount    = followersActions.Length - 1;
        groupInfo.leaderActionIndex = 0;
    }
예제 #2
0
 private SpawnSpiderWaveAction(ColorMode mode, string spPoint, List <AIAction> entry, List <AIAction> attack, List <AIAction> infect, float iniDel, int howMany, float delBetweenSp, SpiderAIBehaviour.SpawnAnimation spawnAnim)
 {
     colorMode          = mode;
     spawnPointName     = spPoint;
     entryActions       = entry;
     attackActions      = attack;
     infectActions      = infect;
     initialDelay       = iniDel;
     totalSpawnsNumber  = howMany;
     delayBetweenSpawns = delBetweenSp;
     spawnAnimation     = spawnAnim;
 }
예제 #3
0
    public override void ResetValues()
    {
        base.ResetValues();

        timeSinceLastAttack = 100f;

        initialCheckDelay          = 0f;
        checkAttackingSpidersDelay = 0f;
        checkInfectingChipDelay    = 0f;

        spawnAnimation = SpiderAIBehaviour.SpawnAnimation.FLOOR;
    }
예제 #4
0
 public SpawnSpiderWaveAction(string spPoint, List <AIAction> entry, List <AIAction> attack, List <AIAction> infect,
                              float iniDel = 0f, int howMany = 1, float delBetweenSp = 0f, SpiderAIBehaviour.SpawnAnimation spawnAnim = SpiderAIBehaviour.SpawnAnimation.FLOOR)
     : this(ColorMode.RANDOM, spPoint, entry, attack, infect, iniDel, howMany, delBetweenSp, spawnAnim)
 {
 }
예제 #5
0
 public SpawnSpiderWaveAction(bool current, int colorOffset, string spPoint, List <AIAction> entry, List <AIAction> attack, List <AIAction> infect,
                              float iniDel = 0f, int howMany = 1, float delBetweenSp = 0f, SpiderAIBehaviour.SpawnAnimation spawnAnim = SpiderAIBehaviour.SpawnAnimation.FLOOR)
     : this(ColorMode.CURRENT, spPoint, entry, attack, infect, iniDel, howMany, delBetweenSp, spawnAnim)
 {
     this.colorOffset = colorOffset;
 }