コード例 #1
0
        private void FrameFunction_Architecture_AfterGetAllyDiplomaticRelation()
        {
            GameObjectList selectedList = this.CurrentArchitecture.AllyDiplomaticRelationList.GetSelectedList();

            if (selectedList != null && (selectedList.Count == 1))
            {
                this.CurrentDiplomaticRelationDisplay = selectedList[0] as DiplomaticRelationDisplay;
                //this.CurrentDiplomaticRelationDisplay.Relation = 301;
                //this.mainGameScreen.xianshishijiantupian(this.CurrentArchitecture.BelongedFaction.Leader, this.CurrentArchitecture.BelongedFaction.Leader.Name, "AllyDiplomaticRelation", "AllyDiplomaticRelation.jpg", "AllyDiplomaticRelation.wav", this.CurrentDiplomaticRelationDisplay.FactionName, true);
                this.mainGameScreen.ShowTabListInFrame(UndoneWorkKind.Frame, FrameKind.Person, FrameFunction.GetAllyDiplomaticRelationPerson, true, true, true, true, this.CurrentArchitecture.Persons, null, "外交人员", "Ability");
            }
        }
コード例 #2
0
        //劝降
        private void FrameFunction_Architecture_AfterGetQuanXiangDiplomaticRelation()
        {
            GameObjectList selectedList = this.CurrentArchitecture.QuanXiangDiplomaticRelationList.GetSelectedList();

            if (selectedList != null && (selectedList.Count == 1))
            {
                this.CurrentDiplomaticRelationDisplay = selectedList[0] as DiplomaticRelationDisplay;
                this.mainGameScreen.ShowTabListInFrame(UndoneWorkKind.Frame, FrameKind.Person, FrameFunction.GetQuanXiangDiplomaticRelationPerson, false, true, true, false, this.CurrentArchitecture.MovablePersons, null, "外交人员", "Ability");
            }
        }
コード例 #3
0
ファイル: Person.cs プロジェクト: simon217/ZhongHuaSanGuoZhi
        public void GoToTruceDiplomatic(DiplomaticRelationDisplay a)
        {
            if (a == null) return;

            Faction targetFaction = this.BelongedFaction.GetFactionByName(a.FactionName);
            Architecture targetArchitecture = targetFaction.Capital;

            if (targetArchitecture == null)
            {
                this.Scenario.GameScreen.xianshishijiantupian(this, this.BelongedFaction.Leader.Name, "TruceDiplomaticRelation", "TruceDiplomaticRelation.jpg", "TruceDiplomaticRelation.wav", "啊,出错了!", true);
                return;
            }

            if (this.LocationArchitecture != targetArchitecture)
            {
                this.outsideDestination = targetArchitecture.Position;
                Point position = this.BelongedArchitecture.Position;
                this.TargetArchitecture = targetArchitecture;

                this.TaskDays = (int)Math.Ceiling((double)(base.Scenario.GetDistance(position, targetArchitecture.Position) / 10.0));
                if (this.taskDays == 0)
                {
                    this.taskDays = 1;
                }
                if (this.taskDays > 5)
                {
                    this.taskDays = 5;
                }

                this.arrivingDays = this.TaskDays * 2;

                this.LocationArchitecture = this.BelongedArchitecture;
                this.WorkKind = ArchitectureWorkKind.无;
                this.OutsideTask = OutsideTaskKind.停战;
                this.Scenario.GameScreen.renwukaishitishi(this, this.TargetArchitecture);
                if (this.BelongedFaction != null)
                {
                    this.Status = PersonStatus.Moving;
                }
                else
                {
                    this.Status = PersonStatus.NoFactionMoving;
                }

            }
        }