void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.ModeChange(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.QueenisADead(); GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance) { if (GuardMushroom.AttackTimer > GuardMushroom.AttackDelay) { GuardMushroom.SetState(GuardMushroomState.Attack); return; } } if (GuardMushroom.AttackTimer < GuardMushroom.AttackDelay && GuardMushroom.GetDistanceFromPlayer() <= GuardMushroom.MStat.AttackDistance) { GuardMushroom.SetState(GuardMushroomState.Return); return; } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance && (CPlayerManager._instance.isDead == false)) { GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); GuardMushroom.SetState(GuardMushroomState.Chase); return; } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.BerserkerMoveSpeed, GuardMushroom.rotAnglePerSecond); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance && GuardMushroom.AttackTimer > GuardMushroom.BerserkerAttackDelay) { GuardMushroom.SetState(GuardMushroomState.BAttack); return; } }
void Update() { GuardMushroom.GoToDestination(new Vector3(this.transform.position.x + default_direction.x, this.transform.position.y, this.transform.position.z + default_direction.z), 1.0f, GuardMushroom.rotAnglePerSecond); if (Vector3.Distance(this.transform.position, GuardMushroom.HomePosition) > 10.0f) { GuardMushroom.GoToDestination(GuardMushroom.HomePosition, 1.0f, GuardMushroom.rotAnglePerSecond); } if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance) { GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); GuardMushroom.SetState(GuardMushroomState.Chase); return; } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.BerserkerMoveSpeed, GuardMushroom.rotAnglePerSecond); if (GuardMushroom.GetDistanceFromPlayer() < 1f) { EffectofSbomb(transform.position); GuardMushroom.OnDead(); } if (GuardMushroom.SbombTimer > 6f) { EffectofSbomb(transform.position); GuardMushroom.OnDead(); } }
/*GuardMushroom.MoveToDestination(); * transform.position = new Vector3(GuardMushroom.GoHomePositionX,GuardMushroom.GoHomePositionY, GuardMushroom.GoHomePositionZ); * * GuardMushroom.MoveToTarget(new Vector3(GuardMushroom.GoHomePositionX, * GuardMushroom.GoHomePositionY, GuardMushroom.GoHomePositionZ));*/ void Update() { if (GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.ChaseDistance) { GuardMushroom.GoToDestination(GuardMushroom.HomePosition, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); if (Vector3.Distance(transform.position, new Vector3(GuardMushroom.GoHomePositionX, GuardMushroom.GoHomePositionY, GuardMushroom.GoHomePositionZ)) <= 2.0f) { GuardMushroom.SetState(GuardMushroomState.Idle); return; } } else { GuardMushroom.SetState(GuardMushroomState.Return); return; } }
void Update() { Dltime += Time.deltaTime; GuardMushroom.GoToDestination(SavePosition, 0, 0); if (Dltime > 1.85f) { GuardMushroom.ifEndBerserker = true; if (GuardMushroom.QueenisAllDead) { GuardMushroom.SetState(GuardMushroomState.BChase); return; } else { GuardMushroom.SetState(GuardMushroomState.Sbombing); return; } } }
void Update() { if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance && GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.AttackDistance) { GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); } if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance) { if (GuardMushroom.attackTimer > GuardMushroom.attackDelay) { GuardMushroom.SetState(GuardMushroomState.Attack); return; } } else { GuardMushroom.SetState(GuardMushroomState.Return); return; } }