コード例 #1
0
ファイル: Physics.cs プロジェクト: FTC5/StudySimulation
        public override int Lab(Group group, Equipment equipment, Room room, ISubActivities subActivities)
        {
            MessageEventArgs       message = new MessageEventArgs();
            SuccessFactorEventArgs factor  = new SuccessFactorEventArgs();

            message.text = "Lab start : \n";

            if (room.Name != "Laboratory")
            {
                message.text += "Students cannot study. They dont have laboratory";
                CallMessageEvent(this, message);
                return(0);
            }
            else if (subActivities == null)
            {
                message.text += "Students nothing to do";
                CallMessageEvent(this, message);
                return(0);
            }
            if (subActivities.ToString() != "Perform experiment")
            {
                message.text += "Students do not conduct experiments. It is not possible to conduct physics";
                CallMessageEvent(this, message);
                return(0);
            }
            message.text  += subActivities.Action() + "\n";
            successFactor += CheckEquipment(equipment);
            message.text  += "Students study";
            CallMessageEvent(this, message);
            CallFactorEvent(this, factor);
            groupRating.SetGroupGrades(group, name);
            return(successFactor);
        }
コード例 #2
0
ファイル: Physics.cs プロジェクト: FTC5/StudySimulationVer1
        public override int Lab(Group group, Equipment equipment, Room room, ISubActivities subActivities)
        {
            successFactor = 0;
            CallMessageEvent("Lab start : ");
            successFactor = 0;

            if (room.Name != "Laboratory")
            {
                CallMessageEvent("Students cannot study. They dont have laboratory");
                return(0);
            }
            else if (subActivities == null)
            {
                CallMessageEvent("Students nothing to do");
                return(0);
            }
            if (subActivities.ToString() != "Perform experiment")
            {
                CallMessageEvent("Students do not conduct experiments. It is not possible to conduct physics");
                return(0);
            }
            CallMessageEvent(subActivities.Action());
            successFactor += CheckEquipment(equipment);
            CallMessageEvent("Students study");
            return(successFactor);
        }