protected override void BrainInitialisation() { hp = configScriptable.bossHp; damage = configScriptable.bossDamage; speed = configScriptable.bossSpeed; bulletSpeed = configScriptable.bossBulletSpeed; damageDealed = false; brain = new Brain(true); Chase chase = new Chase(2f, transform, AI.GetPlayer(), speed * 2); RandomMove randomMove = new RandomMove(1f, transform, speed); ShootAtPosition shoot = new ShootAtPosition(.2f, transform, AI.GetPlayer(), false, bulletSpeed, damage); MultiShot multiShoot = new MultiShot(.2f, transform, AI.GetPlayer(), damage, bulletSpeed); AIWait aIWait = new AIWait(1f); brain.AddAIMechanic(chase); brain.AddAIMechanic(aIWait); brain.AddAIMechanic(multiShoot); brain.AddAIMechanic(aIWait); brain.AddAIMechanic(shoot); brain.AddAIMechanic(shoot); brain.AddAIMechanic(shoot); brain.AddAIMechanic(aIWait); brain.AddAIMechanic(randomMove); brain.ChooseState(); coroutine = Wait(brain.GetCooldown()); StartCoroutine(coroutine); }
void Awake() { Shot_Spawn_Point = gameObject; GuidedShot_Lev = 5; MultiShot_Lev = 5;//우선 임의의 값을 넣음 LazerShot_Lev = 3; Explode_Lev = 1; Mul = new MultiShot(Bolt, Shot_Spawn, gameObject, MultiShot_Lev); Guided = new GuidedShot(Bolt, Shot_Spawn, gameObject, GuidedShot_Lev, GuidedShot_ac); Lazer_Shot = new Layzer_Trap_Shot(Bolt, Shot_Spawn, gameObject, LazerShot_Lev, Lazer); Explode_Shot = new Explode_Trap_Shot(Bolt, Shot_Spawn, gameObject, LazerShot_Lev, Explode); }
public void AddPowerUpTest() { // GameItem-Liste initialisieren GameItem.GameItemList = new System.Collections.Generic.LinkedList <IGameItem>(); // Neuen Spieler erzeugen Player target = CreatePlayer(); // Neues PowerUp und ActivePowerUp erzeugen MultiShot multiShot = new MultiShot(Vector2.Zero, Vector2.Zero); ActivePowerUp powerUp = new ActivePowerUp(15.0f, PowerUpEnum.MultiShot, multiShot.Apply, multiShot.Remove); // TODO: Passenden Wert initialisieren target.AddPowerUp(powerUp); Assert.AreEqual(target.ActivePowerUps.Count, 1); // GameItem-Liste zurüksetzen GameItem.GameItemList = null; }