// Main Constructor - used for most states
 public Tank_State(Tank_StateManager myManager, Tank_Boss thisBoss, string name, float dur)
 {
     SM       = myManager;
     Boss     = thisBoss;
     Name     = name;
     Duration = dur;
 }
Exemplo n.º 2
0
    private void Start()
    {
        Main_SM = this;
        Boss    = this.GetComponent <Tank_Boss>();
        player  = FindObjectOfType <Temp_Player>();

        Idle             = new Tank_State_Idle(Main_SM, Boss, "Idle", Boss.TimeBetweenAttacks_1);
        Prepare          = new Tank_State_Prepare(Main_SM, Boss, "Prepare", Boss.TimeBeforeDriveLaunch);
        DriveBy          = new Tank_State_DriveBy(Main_SM, Boss, "DriveBy", 0);
        DriveOff         = new Tank_State_DriveOff(Main_SM, Boss, "DriveOff", 0);
        DriveIn          = new Tank_State_DriveIn(Main_SM, Boss, "DriveIn", 0);
        DriveCombo       = new Tank_State_DriveCombo(Main_SM, Boss, "DriveCombo", Boss.DriveComboWaitDuration);
        Reposition       = new Tank_State_Reposition(Main_SM, Boss, "Reposition", Boss.ReposDuration, Boss.ReposPrepDuration);
        AttackJumpSingle = new Tank_State_AttackJump(Main_SM, Boss, "AttackJump_1", Boss.JumpPrepDuration_S, Boss.JumpDuration_S, Boss.JumpHitDuration_S, Boss.JumpReturnDuration, 1);
        AttackJumpTriple = new Tank_State_AttackJump(Main_SM, Boss, "AttackJump_3", Boss.JumpPrepDuration_M, Boss.JumpDuration_M, Boss.JumpHitDuration_M, Boss.JumpReturnDuration, 3);
        ShootGunSingle   = new Tank_State_ShootGun(Main_SM, Boss, "ShootGun_1", Boss.GunPrepDuration_S, Boss.GunHitDuration_S, Boss.GunRetDuration_S, 1);
        ShootGunTriple   = new Tank_State_ShootGun(Main_SM, Boss, "ShootGun_3", Boss.GunPrepDuration_M, Boss.GunHitDuration_M, Boss.GunRetDuration_M, 3);
        ShootMortar_1    = new Tank_State_ShootMortar(Main_SM, Boss, "Mortar_1", Boss.MortarPrepDuration, Boss.MortarTimeBtwnShot, Boss.MortarRetDuration, 1);
        ShootMortar_2    = new Tank_State_ShootMortar(Main_SM, Boss, "Mortar_2", Boss.MortarPrepDuration, Boss.MortarTimeBtwnShot, Boss.MortarRetDuration, 2);
        ShootOil_1       = new Tank_State_ShootOil(Main_SM, Boss, "Oil_1", Boss.OilPrepDur, Boss.OilHitDuration, Boss.OilRetDur, 1);
        ShootOil_2       = new Tank_State_ShootOil(Main_SM, Boss, "Oil_2", Boss.OilPrepDur, Boss.OilHitDuration, Boss.OilRetDur, 2);

        Stunned = new Tank_State_Stunned(Main_SM, Boss, "Stunned", Boss.StunDuration);
        Dead    = new Tank_State_Dead(Main_SM, Boss, "Dead", 0);

        //MoveList_1 = new Tank_State[] { ShootMortar_1 };
        MoveList_1 = new Tank_State[] { DriveBy, AttackJumpSingle, AttackJumpSingle, ShootMortar_1, ShootOil_1, Reposition };
        MoveList_2 = new Tank_State[] { DriveBy, AttackJumpTriple, AttackJumpTriple, ShootMortar_2, ShootMortar_2, ShootOil_1, ShootOil_2, Reposition };

        attackStateList = new Tank_State[] { AttackJumpTriple };
        //attackStateList = new Tank_State[] { ShootGunTriple, ShootGunSingle, DriveBy, AttackJumpSingle, AttackJumpTriple, Reposition };

        ChangeState(Idle);
    }
 // Constructor used for Shoot Gun
 public Tank_State(Tank_StateManager myManager, Tank_Boss thisBoss, string name, float prepDur, float hitDur, float retDur, int numAtk)
 {
     SM             = myManager;
     Boss           = thisBoss;
     Name           = name;
     PrepDuration   = prepDur;
     HitDuration    = hitDur;
     ReturnDuration = retDur;
     NumAttacks     = numAtk;
 }
Exemplo n.º 4
0
 public Tank_State_DriveBy(Tank_StateManager myManager, Tank_Boss myBoss, string myName, float myDur) : base(myManager, myBoss, myName, myDur)
 {
 }
 public Tank_State_Reposition(Tank_StateManager myManager, Tank_Boss myBoss, string myName, float myDur, float myPrepDur) : base(myManager, myBoss, myName, myDur, myPrepDur)
 {
 }
Exemplo n.º 6
0
 public Tank_State_Stunned(Tank_StateManager myStateManager, Tank_Boss myBoss, string myName, float myDur) : base(myStateManager, myBoss, myName, myDur)
 {
 }
Exemplo n.º 7
0
 public Tank_State_ShootOil(Tank_StateManager myManager, Tank_Boss myBoss, string myName, float myPrepDur, float myHitDur, float myRetDur, int numAtk) : base(myManager, myBoss, myName, myPrepDur, myHitDur, myRetDur, numAtk)
 {
 }
 public Tank_State_ShootMortar(Tank_StateManager myManager, Tank_Boss myBoss, string myName, float myPrepDur, float myHitDur, float myRetDur, int numAtk) : base(myManager, myBoss, myName, myPrepDur, myHitDur, myRetDur, numAtk)
 {
     StartingHitDuration = myHitDur;
 }