Пример #1
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>();
    }
Пример #2
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;
    }