Ejemplo n.º 1
0
    // once this is done, start the game


    public void CheckGameover()
    {
        Player         player = FindObjectOfType <Player>();
        TrainAttribute att    = FindObjectOfType <TrainAttribute>();

        bool   wonGame = player.Fitness.Current > att.FitnessTest;
        bool   wonExam = player.Knowledge.Current > att.KnowledgeTest;
        string GOText;

        if (wonGame && wonExam)
        {
            GOText = WinBoth;
        }
        else if (wonGame)
        {
            GOText = WinGame;
        }
        else if (wonExam)
        {
            GOText = WinExam;
        }
        else
        {
            GOText = LoseBoth;
        }


        UIpopup.Instance.gameObject.SetActive(false);

        GameoverScreen.gameObject.SetActive(true);

        gameoverscreen goscreen = FindObjectOfType <gameoverscreen>();

        goscreen.GameOverText.text = GOText;
    }
Ejemplo n.º 2
0
        public static TrainAttribute read(BinaryReader binaryReader)
        {
            TrainAttribute newObj = new TrainAttribute();

            newObj.i_atype = (STypeAttribute)binaryReader.ReadUInt32();
            Util.readToAlign(binaryReader);
            newObj.i_xp_spent = binaryReader.ReadUInt32();
            Util.readToAlign(binaryReader);
            return(newObj);
        }
Ejemplo n.º 3
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        case PacketOpcode.Evt_Train__TrainAttribute2nd_ID: {
            TrainAttribute2nd message = TrainAttribute2nd.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Train__TrainAttribute_ID: {
            TrainAttribute message = TrainAttribute.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Train__TrainSkill_ID: {
            TrainSkill message = TrainSkill.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Train__TrainSkillAdvancementClass_ID: {
            TrainSkillAdvancementClass message = TrainSkillAdvancementClass.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }
Ejemplo n.º 4
0
 private void Start()
 {
     GM = FindObjectOfType <GameManager>();
     TrainingOptions = FindObjectOfType <TrainAttribute>();
 }
Ejemplo n.º 5
0
 private void Awake()
 {
     Instance = this;
 }
Ejemplo n.º 6
0
 private void Start()
 {
     player   = FindObjectOfType <Player>();
     TrainAtt = FindObjectOfType <TrainAttribute>();
 }