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


C# Computer.IsComputerUsable方法代码示例

本文整理汇总了C#中Computer.IsComputerUsable方法的典型用法代码示例。如果您正苦于以下问题:C# Computer.IsComputerUsable方法的具体用法?C# Computer.IsComputerUsable怎么用?C# Computer.IsComputerUsable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Computer的用法示例。


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

示例1: Test

            public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                try
                {
                    if (!target.IsComputerUsable(a, true, false, isAutonomous)) return false;

                    return Helpers.TravelUtilEx.CanSimTriggerTravelToHomeWorld(a, ref greyedOutTooltipCallback);
                }
                catch (Exception e)
                {
                    Common.Exception(a, target, e);
                    return false;
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:14,代码来源:TravelBackToHomeWorldEx.cs

示例2: Test

 public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     try
     {
         if (!target.IsComputerUsable(a, true, false, isAutonomous))
         {
             return false;
         }
         else if (!AfterschoolActivityEx.MeetsCommonAfterschoolActivityRequirements(a.SimDescription, ChosenActivity, ref greyedOutTooltipCallback))
         {
             return false;
         }
         return true;
     }
     catch (Exception e)
     {
         Common.Exception(a, target, e);
         return false;
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:20,代码来源:ComputerSignUpForAfterschoolClassEx.cs

示例3: Test

 public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     try
     {
         return (target.IsComputerUsable(a, true, false, isAutonomous) && (GetValidSims(a, true).Count > 0x0));
     }
     catch (Exception e)
     {
         Common.Exception(a, target, e);
         return false;
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:ComputerSignChildUpForAfterschoolClassEx.cs

示例4: Test

            public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                Journalism journalism = OmniCareer.Career<Journalism>(a.Occupation);

                return ((target.IsComputerUsable(a, true, false, isAutonomous) && (journalism != null)) && journalism.CanWriteReview());
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:6,代码来源:WriteRabbitHoleReviewEx.cs

示例5: AddInteractions

            public override void AddInteractions(InteractionObjectPair iop, Sim actor, Computer target, List<InteractionObjectPair> results)
            {
                Journalism job = OmniCareer.Career<Journalism>(actor.Occupation);

                if ((target.IsComputerUsable(actor, true, false, false) && (job != null)) && job.CanWriteReview())
                {
                    foreach (Journalism.ReviewedRabbitHole hole in job.RabbitHolesReviewed)
                    {
                        if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && !hole.IsReviewNegative))
                        {
                            string[] path = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("GoodReview", new object[0x0]) };
                            results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), path, hole, false), iop.Target));
                        }

                        if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && hole.IsReviewNegative))
                        {
                            string[] strArray2 = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("BadReview", new object[0x0]) };
                            results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), strArray2, hole, true), iop.Target));
                        }
                    }
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:22,代码来源:WriteRabbitHoleReviewEx.cs

示例6: Test

            public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!target.IsComputerUsable(a, true, false, isAutonomous))
                {
                    return false;
                }

                if (!Helpers.TravelUtilEx.CanSimTriggerTravelToUniversityWorld(a, true, ref greyedOutTooltipCallback))
                {
                    return false;
                }

                if (a.OccupationAsAcademicCareer != null)
                {
                    return false;
                }

                return true;
            } 
开发者ID:Robobeurre,项目名称:NRaas,代码行数:19,代码来源:ComputerEnrollForUniversityTermEx.cs


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