コード例 #1
0
 protected AbstractAction(
     IQuestTracker questTracker = null,
     IRumourMill rumourMill     = null)
 {
     this.QuestTracker = questTracker ?? GlobalConstants.GameManager?.QuestTracker;
     this.RumourMill   = rumourMill ?? GlobalConstants.GameManager?.RumourMill;
 }
コード例 #2
0
ファイル: ChatterProcessor.cs プロジェクト: Nosrick/JoyGodot
 protected void Initialise()
 {
     if (this.RumourMill is null)
     {
         this.RumourMill = GlobalConstants.GameManager?.RumourMill;
     }
 }
コード例 #3
0
        public void SetUp()
        {
            ActionLog actionLog = new ActionLog();

            GlobalConstants.ActionLog = actionLog;
            this.scriptingEngine      = new ScriptingEngine();

            this.target = new ConcreteRumourMill();

            IWorldInstance world = Mock.Of <IWorldInstance>();

            IGameManager gameManager = Mock.Of <IGameManager>(
                manager => manager.NeedHandler == Mock.Of <INeedHandler>(
                    handler => handler.GetManyRandomised(It.IsAny <IEnumerable <string> >())
                    == new List <INeed>()) &&
                manager.SkillHandler == Mock.Of <IEntitySkillHandler>(
                    handler => handler.GetDefaultSkillBlock()
                    == new Dictionary <string, IEntitySkill>
            {
                {
                    "light blades",
                    new EntitySkill(
                        "light blades",
                        5,
                        7)
                }
            }) &&
                manager.RelationshipHandler == Mock.Of <IEntityRelationshipHandler>() &&
                manager.ObjectIconHandler == Mock.Of <IObjectIconHandler>());

            GlobalConstants.GameManager = gameManager;

            IGender gender = Mock.Of <IGender>(
                g => g.PersonalSubject == "her");

            IDictionary <string, IEntitySkill> skills = gameManager.SkillHandler.GetDefaultSkillBlock();

            this.left = Mock.Of <IEntity>(
                entity => entity.PlayerControlled == true &&
                entity.JoyName == "TEST1" &&
                entity.Skills == skills);

            this.right = Mock.Of <IEntity>(
                entity => entity.JoyName == "TEST2" &&
                entity.Skills == skills);
        }