void SetSubCannonAttack(string cannonName, MZMode mode) { MZControlUpdate<MZPartControl> partControlUpdate = mode.AddPartControlUpdater(); MZPartControl partControl = new MZPartControl( partsByNameDictionary[ cannonName ] ); partControlUpdate.Add( partControl ); MZAttack_Idle show = partControl.AddAttack<MZAttack_Idle>(); show.duration = 1.0f; show.isRunOnce = true; MZAttack_Idle wait1 = partControl.AddAttack<MZAttack_Idle>(); wait1.duration = 2.0f; MZAttack_OddWay attack = partControl.AddAttack<MZAttack_OddWay>(); attack.numberOfWays = 1; attack.bulletName = "EBDonuts"; attack.initVelocity = 250; attack.targetHelp = new MZTargetHelp_Target(); attack.targetHelp.calcuteEveryTime = true; attack.colddown = 0.05f; attack.additionalVelocity = 50; attack.duration = 0.5f; MZAttack_Idle wait2 = partControl.AddAttack<MZAttack_Idle>(); wait2.duration = 2.5f; }
void SetMainBodyAttack(MZMode mode) { MZControlUpdate<MZPartControl> partControlUpdate = mode.AddPartControlUpdater(); MZPartControl partControl = new MZPartControl( partsByNameDictionary[ "MainBody" ] ); partControlUpdate.Add( partControl ); MZAttack_Idle show = partControl.AddAttack<MZAttack_Idle>(); show.duration = 1.0f; show.isRunOnce = true; MZAttack_OddWay nWay = partControl.AddAttack<MZAttack_OddWay>(); nWay.bulletName = "EBBee"; nWay.numberOfWays = 7; nWay.colddown = 0.25f; nWay.intervalDegrees = 10; nWay.initVelocity = 400; nWay.duration = 1.0f; nWay.additionalWaysPerLaunch = -2; nWay.targetHelp = new MZTargetHelp_Target(); nWay.targetHelp.calcuteEveryTime = false; nWay.offsetPositionsList.Add( new Vector2( 0, 0 ) ); for( int i = 0; i < nWay.numberOfWays; i++ ) { nWay.offsetPositionsList.Add( new Vector2( -40*i, 0 ) ); nWay.offsetPositionsList.Add( new Vector2( 40*i, 0 ) ); } MZAttack_Idle cd = partControl.AddAttack<MZAttack_Idle>(); cd.duration = 4.0f; }
void AddOddWayAttack(MZCharacterPart part, MZMode mode) { MZPartControl partControl = new MZPartControl( part ); MZControlUpdate<MZPartControl> partControlUpdate = mode.AddPartControlUpdater(); partControlUpdate.Add( partControl ); MZAttack_OddWay attack = partControl.AddAttack<MZAttack_OddWay>(); attack.numberOfWays = 1; attack.colddown = 0.3f; attack.duration = 0.1f; attack.initVelocity = 500; attack.bulletName = "EBDonuts"; attack.targetHelp = new MZTargetHelp_Target(); MZAttack_Idle idle = partControl.AddAttack<MZAttack_Idle>(); idle.duration = 3; }
void SetMainAttack(string partName, MZMode mode) { MZControlUpdate<MZPartControl> partControlUpdate = mode.AddPartControlUpdater(); MZPartControl partControl = new MZPartControl( partsByNameDictionary[ partName ] ); partControlUpdate.Add( partControl ); MZAttack_Idle show = partControl.AddAttack<MZAttack_Idle>(); show.duration = 1.0f; show.isRunOnce = true; MZAttack_OddWay nWay = partControl.AddAttack<MZAttack_OddWay>(); nWay.bulletName = "EBBee"; nWay.numberOfWays = 7; nWay.colddown = 0.25f; nWay.intervalDegrees = 10; nWay.initVelocity = 400; nWay.duration = 1.0f; nWay.additionalWaysPerLaunch = -2; nWay.targetHelp = new MZTargetHelp_Target(); MZAttack_Idle cd = partControl.AddAttack<MZAttack_Idle>(); cd.duration = 4.0f; }
void SetNewPartToMultiVortexAttack(MZMode mode, MZEnemy enemy, float degrees) { MZPartControl partControl = new MZPartControl( enemy.partsByNameDictionary[ "MainBody" ] ); mode.AddPartControlUpdater().Add( partControl ); AddMultiVortex( partControl, degrees ); }
void AddCrossWayAttack(MZCharacterPart part, MZMode mode, float degree, int way) { MZPartControl partControl = new MZPartControl( part ); mode.AddPartControlUpdater().Add( partControl ); float rankIdle = ( ( rank < 3 )? 0.5f : 0 ); MZAttack_OddWay odd = partControl.AddAttack<MZAttack_OddWay>(); odd.numberOfWays = way; odd.colddown = 0.1f; odd.duration = 1.0f - rankIdle + ( ( rank >= 7 )? -0.6f : 0 ); odd.bulletName = "EBDonuts"; odd.initVelocity = 300; odd.additionalVelocity = 80; odd.targetHelp = MZTargetHelp.Create<MZTargetHelp_AssignDirection>(); ( odd.targetHelp as MZTargetHelp_AssignDirection ).direction = degree; float interval = 50; odd.offsetPositionsList.Add( new Vector2( 0, -interval ) ); odd.offsetPositionsList.Add( new Vector2( -interval, 0 ) ); odd.offsetPositionsList.Add( new Vector2( interval, 0 ) ); MZAttack_Idle idle = partControl.AddAttack<MZAttack_Idle>(); idle.duration = 0.6f + rankIdle; }