当前位置: 首页>>代码示例>>C#>>正文


C# Goal类代码示例

本文整理汇总了C#中Goal的典型用法代码示例。如果您正苦于以下问题:C# Goal类的具体用法?C# Goal怎么用?C# Goal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Goal类属于命名空间,在下文中一共展示了Goal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: navigateToStage

 /// <summary>
 /// Begins the boid walk to the stage
 /// </summary>
 private void navigateToStage()
 {
     GoalSeekingBehaviour behaviour = new LineOfSightGoalSeekingBehaviour(owner);
     this.currentGoal = behaviour.ChooseClosestFromList(BootStrapper.EnvironmentManager.CurrentEnvironment.World.Stages);
     owner.Behaviour = behaviour;
     NextStep();
 }
开发者ID:aaronbloom,项目名称:crowd-simulation,代码行数:10,代码来源:DanceProcess.cs

示例2: navigateToBar

 /// <summary>
 /// Begins the boid walk to the bar
 /// </summary>
 private void navigateToBar()
 {
     GoalSeekingBehaviour gsb = new GoalSeekingBehaviour(owner);
     currentGoal = gsb.ChooseClosestFromList(BootStrapper.EnvironmentManager.CurrentEnvironment.World.Bars);
     owner.Behaviour = gsb;
     NextStep();
 }
开发者ID:aaronbloom,项目名称:crowd-simulation,代码行数:10,代码来源:BarProcess.cs

示例3: EstablishContext

        protected override void EstablishContext()
        {
            //Prepare supplied data collections
            suppliedStudentMetricBenchmarkAssessmentData = GetSuppliedStudentMetricBenchmarkAssessment();
            suppliedSchoolGoal = GetSuppliedMetricGoal();
            suppliedMetricState = GetSuppliedMetricState();

            //Set up the mocks
            metricNodeResolver = mocks.StrictMock<IMetricNodeResolver>();
            studentMetricBenchmarkAssessmentRepository = mocks.StrictMock<IRepository<StudentMetricBenchmarkAssessment>>();
            metricGoalProvider = mocks.StrictMock<IMetricGoalProvider>();
            metricStateProvider = mocks.StrictMock<IMetricStateProvider>();
            metricInstanceSetKeyResolver = mocks.StrictMock<IMetricInstanceSetKeyResolver<StudentSchoolMetricInstanceSetRequest>>();

            //Set expectations
            Expect.Call(metricNodeResolver.GetMetricNodeForStudentFromMetricVariantId(suppliedSchoolId, suppliedMetricVariantId)).Return(GetMetricMetadataNode());
            Expect.Call(studentMetricBenchmarkAssessmentRepository.GetAll()).Return(suppliedStudentMetricBenchmarkAssessmentData);
            Expect.Call(
                metricInstanceSetKeyResolver.GetMetricInstanceSetKey(null))
                .Constraints(
                    new ActionConstraint<StudentSchoolMetricInstanceSetRequest>(x =>
                    {
                        Assert.That(x.SchoolId == suppliedSchoolId);
                        Assert.That(x.MetricVariantId == suppliedMetricVariantId);
                        Assert.That(x.StudentUSI == suppliedStudentUSI);
                    })
                ).Return(suppliedMetricInstanceSetKey);
            Expect.Call(metricGoalProvider.GetMetricGoal(suppliedMetricInstanceSetKey, suppliedMetricId)).Return(suppliedSchoolGoal);
            Expect.Call(metricStateProvider.GetState(suppliedMetricId, suppliedMetricValueStr, "System.Double")).Repeat.Any().Return(suppliedMetricState);
            Expect.Call(metricStateProvider.GetState(suppliedMetricId, "", "System.Double")).Return(suppliedMetricState);
        }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:31,代码来源:BenchmarkHistoricalChartServiceFixture.cs

示例4: EventGoalScored

    public void EventGoalScored(Goal scoredOn)
    {
        if (scoredOn == Player1Goal)
        {
            Player2Score += 1;
            p1scorestreak = 0;

            int tmp = (int)Player2Goal.transform.localScale.y;
            if (tmp > 1)
            {
                tmp -= 1;
                Player2Goal.transform.localScale = new Vector3(1.5f, tmp, 1);
            }
        }
        if (scoredOn == Player2Goal)
        {
            Player1Score += 1;
            p2scorestreak = 0;
            int tmp = (int)Player1Goal.transform.localScale.y;
            if (tmp > 1)
            {
                tmp -= 1;
                Player1Goal.transform.localScale = new Vector3(1.5f, tmp, 1);
            }
        }
    }
开发者ID:rowlandsc,项目名称:GMAP348GroupProjects,代码行数:26,代码来源:GameManager.cs

示例5: Trigger

 /// <summary>Initializes a new Trigger</summary>
 /// <param name="parent">The <see cref="Goal"/> to which this object belongs.</param>
 /// <remarks>Trigger set to <b>10</b>, "never (FALSE)".</remarks>
 public Trigger(Goal parent)
 {
     _owner = parent;
     GoalTrigger = new Mission.Trigger();
     GoalTrigger.Condition = 10;
     for (int i = 0; i < 3; i++) _strings[i] = "";
 }
开发者ID:MikeG621,项目名称:Platform,代码行数:10,代码来源:Globals.Goal.Trigger.cs

示例6: CheckForHighScores

    public static bool CheckForHighScores(Goal goal)
    {
        if (!SaveDataControl.GoalHighScores.ContainsKey(goal.MiniDescription)) {
            if((goal.HighScore != 0) | (goal.HighScore == 0 && !goal.HigherScoreIsGood))
            SaveDataControl.GoalHighScores[goal.MiniDescription] = goal.HighScore;

            SaveDataControl.Save();
            return true;
        }
        if (goal.HigherScoreIsGood) {
            if(SaveDataControl.GoalHighScores[goal.MiniDescription] < goal.HighScore) {
                Debug.Log("new high score is " + goal.HighScore);
                SaveDataControl.GoalHighScores[goal.MiniDescription] = goal.HighScore;

                SaveDataControl.Save();
                return true;
            }
        } else {
            if(SaveDataControl.GoalHighScores[goal.MiniDescription] > goal.HighScore) {
                Debug.Log("new high score is " + goal.HighScore);
                SaveDataControl.GoalHighScores[goal.MiniDescription] = goal.HighScore;

                SaveDataControl.Save();
                return true;
            }
        }
        return false;
    }
开发者ID:kenning,项目名称:popul-vuh,代码行数:28,代码来源:SaveDataControl.cs

示例7: EstablishContext

        protected override void EstablishContext()
        {
            //Prepare supplied data collections
            _suppliedStudentMetricAssessmentHistorical = GetSuppliedStudentMetricAssessmentHistorical();
            _suppliedStudentMetricAssessmentHistoricalMetaData = GetSuppliedStudentMetricAssessmentHistoricalMetaData();
            _suppliedSchoolGoal = GetSuppliedMetricGoal();

            //Set up the mocks
            _metricNodeResolver = mocks.StrictMock<IMetricNodeResolver>();
            _studentMetricAssessmentHistorical = mocks.StrictMock<IRepository<StudentMetricAssessmentHistorical>>();
            _studentMetricAssessmentHistoricalMetaData = mocks.StrictMock<IRepository<StudentMetricAssessmentHistoricalMetaData>>();
            _metricGoalProvider = mocks.StrictMock<IMetricGoalProvider>();
            _metricInstanceSetKeyResolver = mocks.StrictMock<IMetricInstanceSetKeyResolver<StudentSchoolMetricInstanceSetRequest>>();

            //Set expectations
            Expect.Call(_metricNodeResolver.GetMetricNodeForStudentFromMetricVariantId(SuppliedSchoolId, SuppliedMetricVariantId)).Return(GetMetricMetadataNode());
            Expect.Call(_studentMetricAssessmentHistorical.GetAll()).Return(_suppliedStudentMetricAssessmentHistorical);
            Expect.Call(_studentMetricAssessmentHistoricalMetaData.GetAll()).Return(_suppliedStudentMetricAssessmentHistoricalMetaData);
            Expect.Call(
                _metricInstanceSetKeyResolver.GetMetricInstanceSetKey(null))
                .Constraints(
                    new ActionConstraint<StudentSchoolMetricInstanceSetRequest>(x =>
                    {
                        Assert.That(x.SchoolId == SuppliedSchoolId);
                        Assert.That(x.MetricVariantId == SuppliedMetricVariantId);
                        Assert.That(x.StudentUSI == SuppliedStudentUsi);
                    })
                ).Return(_suppliedMetricInstanceSetKey);
            Expect.Call(_metricGoalProvider.GetMetricGoal(_suppliedMetricInstanceSetKey, SuppliedMetricId)).Return(_suppliedSchoolGoal);
        }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:30,代码来源:StudentMetricAssessmentHistoricalServiceFixture.cs

示例8: InitializeGoals

    public Goal[] InitializeGoals(int numberOfGods)
    {
        unusedGoals = new List<Goal> ();

        GodChoiceMenu menu = gameObject.GetComponent<GodChoiceMenu> ();

        //If godchoicemenu is unlocked, pick from the selected gods' goals; otherwise, pick from all goals
        if(SaveDataControl.UnlockedGods.Count == 7) {
            for(int i = 0; i < allGoals.Count; i++) {
                for(int j = 0; j < menu.GodChoiceSelection.Length; j++) {
                    if(menu.GodChoiceSelection[j] && allGoals[i].God == ShopControl.AllGods[j]){
                        unusedGoals.Add(allGoals[i]);
                    }
                }
            }
        } else {
            for(int i = 0; i < allGoals.Count; i++) {
                unusedGoals.Add(allGoals[i]);
            }
        }

        Goal[] Goals = new Goal[numberOfGods];
        for(int i = 0; i < numberOfGods; i++){
            Goals[i] = new Goal();
            int randomNumber = Random.Range (0, unusedGoals.Count);
            Goals[i] = unusedGoals[randomNumber];
            unusedGoals.RemoveAt(randomNumber);
        }

        return Goals;
    }
开发者ID:kenning,项目名称:popul-vuh,代码行数:31,代码来源:GoalLibrary.cs

示例9: Awake

    protected void Awake()
    {
        if(sInstance != null)
        {
            Destroy(gameObject);
            return;
        }

        sInstance = this;

        if (mDungeon == null)
        {
            mDungeon = FindObjectOfType<Dungeon>();
        }

        if (mFollowCamera == null)
        {
            mFollowCamera = FindObjectOfType<FollowCamera>();
        }

        if(mFader == null)
        {
            mFader = FindObjectOfType<Fader>();
        }

        GameObject goalObj = SpawnPrefab(mGoalPrefab);
        mGoal = goalObj.GetComponent<Goal>();
        GameObject playerObj = SpawnPrefab(GlobalData.sSelectedCharacter == SelectedCharacter.Rose ? mPlayerRosePrefab : mPlayerVuPrefab);
        mPlayer1 = playerObj.GetComponent<PlayerController>();
        mFollowCamera.Init(mPlayer1.transform);
    }
开发者ID:stregawolf,项目名称:VDayJam2016,代码行数:31,代码来源:GameManager.cs

示例10: Awake

        void Awake()
        {
            Think = new Think(gameObject);

            Think.RemoveAllSubGoals();

            Think.OnActivate();
        }
开发者ID:luukholleman,项目名称:Imperator-Fundum,代码行数:8,代码来源:GoalBehaviour.cs

示例11: Disjunction

 public static Goal Disjunction(Goal goal1, Goal goal2)
 {
     return subst =>
     {
         var res = Disjunction(subst, goal1, goal2);
         return res.Any() ? res.Select(s => new InfiniteSubstitutions(s)) : null;
     };
 }
开发者ID:WinMustDie,项目名称:miniKanren,代码行数:8,代码来源:MicroKanren.cs

示例12: Quest

 public Quest(string n, string d, string o, int i, Goal[] newGoals )
 {
     name = n;
     description = d;
     objective = o;
     iden = i;
     goal = newGoals;
 }
开发者ID:chicostategamestudios,项目名称:qk-pop,代码行数:8,代码来源:Quests.cs

示例13: HasGoal

 public bool HasGoal(Goal _g)
 {
     if (this.subGoals.Count > 0)
     {
         return subGoals[0] != _g;
     }
     return true;
 }
开发者ID:Ashen-Vaults,项目名称:Unity-Path-Finder,代码行数:8,代码来源:GoalList.cs

示例14: NewLevelNewGoals

    public void NewLevelNewGoals(int numberOfGods, Goal[] goals)
    {
        Goals = goals;

        TurnOnExpoGUI ();

        S.ShopAndGoalParentCanvasInst.NewLevelNewGoals (goals);
    }
开发者ID:kenning,项目名称:popul-vuh,代码行数:8,代码来源:ShopControlGUI.cs

示例15: Awake

 void Awake()
 {
     playerGoal = (Goal)GameObject.Find("PGoal").GetComponent(typeof(Goal));
     shadowGoal = (Goal)GameObject.Find("SGoal").GetComponent(typeof(Goal));
     player = GameObject.Find("Player");
     shadow = GameObject.Find("Shadow");
     spawner = (Spawner)gameObject.GetComponent(typeof(Spawner));
 }
开发者ID:adahera222,项目名称:Equate,代码行数:8,代码来源:GlobalControls.cs


注:本文中的Goal类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。