void SelectCurrentRandomBasherAttack() { if (!DebugBasherWeaponTestOverrideMode) { basherAttackMode = (BasherAttackMode)Random.Range(0, basherAttackItemsLength); basherAttackModifier = (BasherAttackModifier)Random.Range(0, 2); } // don't want to randomly select this defense // if (basherAttackMode == BasherAttackMode.HatchPulse || // basherAttackMode == BasherAttackMode.FrontDoor) // restore frontDoor after it's been implemented if (basherAttackMode == BasherAttackMode.HatchPulse) { SelectCurrentRandomBasherAttack(); } if (Weakspot.GetComponent <Collider>().enabled == true) { if (basherAttackMode == BasherAttackMode.Plow) { SelectCurrentRandomBasherAttack(); } } }
void BasherWeaponTesting() { // these are just for debugging and testing bool shouldTestAttack = false; if (DebugHatchBullet) { basherAttackMode = BasherAttackMode.Hatch; shouldTestAttack = true; } if (DebugCharge) { basherAttackMode = BasherAttackMode.Charge; shouldTestAttack = true; } if (DebugMissile_L) { basherAttackMode = BasherAttackMode.SideMissiles; basherAttackModifier = BasherAttackModifier.Left; shouldTestAttack = true; } if (DebugMissile_R) { basherAttackMode = BasherAttackMode.SideMissiles; basherAttackModifier = BasherAttackModifier.Right; shouldTestAttack = true; } if (DebugSpread_L) { basherAttackMode = BasherAttackMode.SpreadGun; basherAttackModifier = BasherAttackModifier.Left; shouldTestAttack = true; } if (DebugSpread_R) { basherAttackMode = BasherAttackMode.SpreadGun; basherAttackModifier = BasherAttackModifier.Right; shouldTestAttack = true; } if (DebugPlow) { basherAttackMode = BasherAttackMode.Plow; shouldTestAttack = true; } if (DebugFrontProj) { basherAttackMode = BasherAttackMode.FrontDoor; shouldTestAttack = true; } if (DebugHatchPulse) { basherAttackMode = BasherAttackMode.HatchPulse; shouldTestAttack = true; } DebugHatchBullet = false; DebugMissile_L = false; DebugMissile_R = false; DebugCharge = false; DebugSpread_L = false; DebugSpread_R = false; DebugPlow = false; DebugFrontProj = false; DebugHatchPulse = false; if (shouldTestAttack) { shouldTestAttack = false; if (attackingCoroutine != null) { StopCoroutine(attackingCoroutine); } attackingCoroutine = (BasherChaseAttack()); StartCoroutine(attackingCoroutine); } }