コード例 #1
0
ファイル: LaserDomeTasks.cs プロジェクト: scottbass47/gsts
    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
ファイル: DasherTasks.cs プロジェクト: scottbass47/gsts
    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;
    }