public BossReturnState(BossAgent agent, Vector3 originalPoint, Quaternion originalRotation) : base(agent) { _originalPoint = originalPoint; _originalRotation = originalRotation; _targetXZ = new Vector2(_originalPoint.x, _originalPoint.z); _parentXZ = new Vector2(_agent.Parent.transform.position.x, _agent.Parent.transform.position.z); }
public BossPatrolState(BossAgent agent, Quaternion originalRotation, NavigationPath patrolPath = null) : base(agent) { if (patrolPath != null) { _path = patrolPath.Path; _currentPos = new Vector2(_agent.Parent.position.x, _agent.Parent.position.z); } _originalRotation = originalRotation; }
public override void Update(BossAgent agent) { if (agent.GetIsPlayerInRange()) { agent.SetState(BossFollowPlayerState.GetInstance()); } if (agent.GetIsBaseInAttackRange()) { agent.SetState(BossAttackState.GetInstance()); } }
public override void Update(BossAgent agent) { agent.SetPlayerAsTarget(); if (agent.GetIsPlayerInAttackRange()) { agent.SetState(BossAttackState.GetInstance()); } if (!agent.GetIsPlayerInRange()) { agent.SetState(BossChargeTownState.GetInstance()); } }
/* * public BossAttackState(BossAgent agent, GameObject muzzleFlash, GameObject bloodParticles, GameObject impactParticles, GameObject turretPoint) : base(agent) * { * random = new System.Random(); * _muzzleFlash = muzzleFlash; * _bloodParticles = bloodParticles; * _impactParticles = impactParticles; * _turret = turretPoint.transform; * _turretVector = _turret.position; * } */ public BossAttackState(BossAgent agent, GameObject muzzleFlash, GameObject bloodParticles, GameObject impactParticles, GameObject turretPoint, int aimDistortion, int aimSteadiness, int acceptableShotRange, int shotsPerSecond) : base(agent) { random = new System.Random(); _muzzleFlash = muzzleFlash; _bloodParticles = bloodParticles; _impactParticles = impactParticles; _turret = turretPoint.transform; _turretVector = _turret.position; _aimDistortion = aimDistortion; _aimSteadiness = 0.2f / aimSteadiness; _acceptableShotRange = acceptableShotRange; _shotsPerSecond = shotsPerSecond; }
protected AbstractBossState(BossAgent agent) { _agent = agent; }
public override void Exit(BossAgent agent) { }
public override void Enter(BossAgent agent) { agent.Attack(); }
public abstract void Exit(BossAgent agent);
public abstract void Update(BossAgent agent);
public abstract void Enter(BossAgent agent);
public override void Enter(BossAgent agent) { }
public BossLookoutState(BossAgent agent) : base(agent) { }
public override void Enter(BossAgent agent) { agent.SetBaseAsTarget(); }
public BossChaseState(BossAgent agent) : base(agent) { }