Esempio n. 1
0
    public void Load(int i)
    {
        sm.InfoLoad();

        Save sv = sm.Saves[i];

        if (sv == null)
        {
            return;
        }
        m_TaskNum = sv.TaskID;
        Task tk = tl.GetTaskStatus(m_TaskNum);

        if (tk != null)
        {
            tk = sv.TaskInfo;
        }
        p1              = sv.P1;
        p2              = sv.P2;
        p3              = sv.P3;
        bag             = sv.BackPack;
        mapName         = sv.MapName;
        player_position = new Vector3(sv.X, sv.Y, sv.Z);
        Application.LoadLevelAsync(mapName);
        mapNameText.text = mapName;
        m_LoadShow.SetActive(false);
        BgMusic.dd.StopBgMusic();
        BgMusic.dd.LoadMusicSource();
        BgMusic.dd.PlayBgMusic();
    }
Esempio n. 2
0
    public void Init()
    {
        sm.InfoLoad();
        for (int i = 0; i < 3; i++)
        {
            if (sm.Saves[i] != null && m_LoadText[i] != null)
            {
                m_LoadText[i].text = sm.Saves[i].Time.ToString();
            }
            else if (m_LoadText[i] != null)
            {
                m_LoadText[i].text = "";
            }
        }

        m_TaskNum       = 0;                       //当前任务ID
        player_position = new Vector3(0, 0, 0);    //记录场景移动时下一次移动的坐标,z坐标一般为0

        //三个人物
        //p1 = new Person(0, "小黑", 1000, 9999, 20, 30, 11, 18, 8, 1, 0, 3, 2, 2, 3, 4, 1, 1, "myimport/zhujue1/女主行走图", 2, 0, 0);
        //p2 = new Person(1, "小绿", 1000, 9999, 20, 30, 12, 18, 8, 1, 0, 3, 2, 2, 3, 4, 1, 1, "myimport/Npc/038-Mage06", 2, 0, 0);
        //p3 = new Person(2, "小蓝", 1000, 9999, 20, 30, 51, 18, 8, 1, 0, 3, 2, 2, 3, 4, 1, 1, "myimport/Npc/001-Fighter01", 2, 0, 0);

        p1 = new Person(0, "克萝莉亚", 590, 570, 50, 48, 73, 10, 10, 1, 0, 53, 14, 15, 7, 3, 2, 49, "myimport/zhujue1/女主行走图", 2, 0, 0);
        p2 = new Person(1, "西露达", 422, 606, 35, 71, 46, 8, 12, 1, 0, 47, 20, 11, 5, 2, 3, 56, "myimport/Npc/038-Mage06", 2, 0, 0);
        p3 = new Person(2, "帕吉尔", 710, 535, 67, 40, 58, 12, 8, 1, 0, 69, 9, 18, 6, 3, 2, 49, "myimport/Npc/001-Fighter01", 2, 0, 0);


        //背包,包括装备,物品,金钱
        bag = new BackPack();

        tk = new TalkText();

        tl = new TaskList();

        tk = new TalkText();
        p1.AddSkill(p1.skillFactory.CreateSkill("无限剑制"));
        p1.AddSkill(p1.skillFactory.CreateSkill("六脉神剑"));
        p1.AddSkill(p1.skillFactory.CreateSkill("八荒六合"));
        p2.AddSkill(p2.skillFactory.CreateSkill("大火球"));
        p2.AddSkill(p2.skillFactory.CreateSkill("岩浆爆破"));
        p2.AddSkill(p2.skillFactory.CreateSkill("烈焰风暴"));
        p3.AddSkill(p3.skillFactory.CreateSkill("瞬劈"));
        p3.AddSkill(p3.skillFactory.CreateSkill("生死不觉"));
        p3.AddSkill(p3.skillFactory.CreateSkill("临危不惧"));
        bag.Money = 500;


        ProductFactory pf = new ProductFactory();

        bag.SetGoods(pf.CreateProduct("血气丸", 3));
        bag.SetGoods(pf.CreateProduct("凝神露", 3));
        EquipmentFactory ef = new EquipmentFactory();

        bag.SetGoods(ef.CreateEquipment("铁盔"));
        bag.SetGoods(ef.CreateEquipment("大法师之帽"));
    }
Esempio n. 3
0
 void OnTriggerExit(Collider other)
 {
     if (other.tag == "Player")
     {
         Debug.Log("Exited");
         active = false;
         foreach (GameObject btn in actions)
         {
             btn.SetActive(false);
         }
         TalkImage.SetActive(false);
         TalkImageActive = false;
         TalkText.SetActive(false);
     }
 }
Esempio n. 4
0
 public void Talk()
 {
     if (TalkImageActive)
     {
         TalkImage.SetActive(false);
         TalkImageActive = false;
         TalkText.SetActive(false);
     }
     else
     {
         RescueLeaderAnim.SetTrigger("LeaderTalkTrigger");
         TalkImage.SetActive(true);
         TalkImageActive = true;
         TalkText.SetActive(true);
     }
 }
Esempio n. 5
0
    public override void GiveLife()
    {
        base.GiveLife();
        Name = "Clean Booga";

        TalkText.Add("Welcome to Booga's Welcome of Fate");

        Quests.Add(new Quest(Quest.QuestType.Slay, "Slay the Gators", "Clean Booga",
                             new List <string>()
        {
            "Hey, I need you to kill those Gators.", "There should be a lot on the right side.", "Compelete this quest and I'll reward you."
        },
                             new List <string>()
        {
            "Alright then, let me teach you some basics.", "Press the I key to open your inventory. You can equip items from here.",
            "You should equip the weapon in your inventory.", "While holding a weapon, press the X key to perform a basic attack", "Tap repeatedly to combo!"
        },
                             new List <string>()
        {
            "You are a f*****g retard.", "Do you not want to progress in this game?"
        },
                             new List <string>()
        {
            "Go kill the Gators then come back to me."
        },
                             new List <string>()
        {
            "Nice job!", "Here's your reward", "I have opened a new portal to the north",
            "Once you go in, you can never come back here", "Make sure you are prepared for the real world"
        },
                             "100 Gold / 50 Exp",
                             "Clean Booga wants me to slay the Gators around here.",
                             new List <QuestGoal>()
        {
            new QuestGoal(QuestGoal.ObjectiveType.Monster, 0, 5, "Slay 5 Gators")
        }));
    }
Esempio n. 6
0
    void Start()
    {
        CommunicationLayer = HUD.transform.Find("CommunicationLayer").gameObject;
        TalkBtn            = CommunicationLayer.transform.Find("CommTalkBtn").gameObject;
        FinishBtn          = CommunicationLayer.transform.Find("CommFinishBtn").gameObject;
        TalkImage          = HUD.transform.Find("TalkImage").gameObject;

        actions = new List <GameObject>()
        {
            FinishBtn, TalkBtn
        };
        active = false;
        foreach (GameObject btn in actions)
        {
            btn.SetActive(false);
        }
        TalkText = TalkImage.transform.Find("TalkText").gameObject;
        Text txtField = TalkText.GetComponent <Text>();

        txtField.text = "Hi! There has been a car accident. Several pepople are serverely injured. Please hurry! And also, watch out for the gas leak... ";
        TalkText.SetActive(false);
        TalkImage.SetActive(false);
        RescueLeaderAnim = transform.parent.gameObject.GetComponent <Animator>();
    }
Esempio n. 7
0
 public void CloseTalk()
 {
     TalkImage.SetActive(false);
     TalkImageActive = false;
     TalkText.SetActive(false);
 }
Esempio n. 8
0
 public void BeginTextDisplay(TalkText text)
 {
     TalkLabels.Last().Caption = text.Text;
     TalkLabels.Last().SetPosition(0.5f - TalkLabels.Last().GetTextWidth() * 0.5f, 0.889f);
     Engine.Singleton.SoundManager.PlayDialog(text.Sound);
     TextRemainingTime = text.Duration;
 }
Esempio n. 9
0
 public List<TalkText> LoadText(int eventID)
 {
     textList = new List<TalkText>();
     string[] proArray;
     string[] dataArray = openingData.ToString().Split('\n');
     for (int i = 1; i < dataArray.Length; i++)
     {
         if (dataArray[i] != "")
         {
             proArray = dataArray[i].Split(',');
             if (proArray[0].Equals(eventID.ToString()))
             {
                 TalkText text = new TalkText();
                 switch (proArray[1])
                 {
                     case "text":
                         {
                             text.textType = TextType.text;
                             break;
                         }
                     case "textArea":
                         {
                             text.textType = TextType.textArea;
                             break;
                         }
                     case "picture":
                         {
                             text.textType = TextType.picture;
                             break;
                         }
                 }
                 switch (proArray[2])
                 {
                     case "foi":
                         {
                             text.textEffect = TextEffect.foi;
                             break;
                         }
                     case "in":
                         {
                             text.textEffect = TextEffect.pictureIn;
                             break;
                         }
                     case "out":
                         {
                             text.textEffect = TextEffect.pictureOut;
                             break;
                         }
                 }
                 text.textInfo = proArray[3].Replace("\\n", "\n").Replace("\r", "");
                 text.iconName = proArray[4];
                 text.speakerName = proArray[5];
                 textList.Add(text);
             }
         }
     }
     return textList;
 }