Beispiel #1
0
 public void Start()
 {
     ai          = GetComponent <AI>();
     rb2d        = GetComponent <Rigidbody2D>();
     pathFinding = GetComponent <PathFindingTasks>();
     pathFinding.SetMovementParameters(gruntStats.Speed, gruntStats.TurningVelocity);
 }
Beispiel #2
0
 public void Start()
 {
     ai          = GetComponent <AI>();
     pathFinding = GetComponent <PathFindingTasks>();
     pathFinding.SetMovementParameters(sprinterStats.RunSpeed, sprinterStats.TurningVelocity);
     pathFinding.SetMoveSpeedFunction(() => isSprinting ? sprinterStats.SprintSpeed : sprinterStats.RunSpeed);
 }
Beispiel #3
0
    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>();
    }
Beispiel #4
0
    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));
    }
Beispiel #5
0
    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;
    }