public void Start() { ai = GetComponent <AI>(); rb2d = GetComponent <Rigidbody2D>(); pathFinding = GetComponent <PathFindingTasks>(); pathFinding.SetMovementParameters(gruntStats.Speed, gruntStats.TurningVelocity); }
public void Start() { ai = GetComponent <AI>(); pathFinding = GetComponent <PathFindingTasks>(); pathFinding.SetMovementParameters(sprinterStats.RunSpeed, sprinterStats.TurningVelocity); pathFinding.SetMoveSpeedFunction(() => isSprinting ? sprinterStats.SprintSpeed : sprinterStats.RunSpeed); }
public void Start() { ai = GetComponent <AI>(); animationTasks = GetComponent <AnimationTasks>(); animationHelper = GetComponentInChildren <LaserDomeAnimationHelper>(); pathFinding = GetComponentInChildren <PathFindingTasks>(); pathFinding.SetMovementParameters(laserDomeStats.Speed, laserDomeStats.TurningVelocity); pathFinding.SetMoveSpeedFunction(() => hopStarted ? laserDomeStats.Speed : 0); laserObj = Instantiate(laserPrefab, laserSortingGroup.transform); laserObj.SetActive(false); laser = laserObj.GetComponent <Laser>(); }
public void Start() { ai = GetComponent <AI>(); movement = GetComponent <Movement>(); attackDirection = GetComponentInChildren <ShieldDroneAttackDirection>(); damageFilter = GetComponent <DamageFilter>(); damageFilter.IsInvulnerable = true; shield = shieldObject.GetComponent <Shield>(); shield.ShieldTime = 0.5f; pathFinding = GetComponent <PathFindingTasks>(); pathFinding.SetMovementParameters(shieldDroneStats.Speed, float.MaxValue); pathFinding.SetPathParameters(new PathParameters(false, 0.05f)); }
public void Start() { ai = GetComponent <AI>(); basicTasks = GetComponent <BasicTasks>(); animationTasks = GetComponent <AnimationTasks>(); physics = GetComponent <Physics>(); movement = GetComponent <BasicMovement>(); gun = GetComponentInChildren <Gun>(); particles = GetComponent <ParticleSystem>(); pathFinding = GetComponent <PathFindingTasks>(); pathFinding.SetMovementParameters(dasherStats.Speed, dasherStats.TurningVelocity); var playerBody = GameManager.Instance.Player.GetComponent <Body>(); targetBody = playerBody.CenterBody; }
public void SetChasePathParameters() { pathFinding.SetMovementParameters(dasherStats.Speed, dasherStats.TurningVelocity); Task.current.Succeed(); }