public override void Load()
        {
            instance   = this;
            skill1     = RegisterHotKey("Skill 1", "F2");
            skill2     = RegisterHotKey("Skill 2", "F3");
            skill3     = RegisterHotKey("Skill 3", "F4");
            skill4     = RegisterHotKey("Skill 4", "F5");
            skill5     = RegisterHotKey("Skill 5", "F6");
            skill6     = RegisterHotKey("Skill 6", "F7");
            skill7     = RegisterHotKey("Skill 7", "F8");
            skill8     = RegisterHotKey("Skill 8", "F9");
            skillsList = new SkillsList();
            if (!Main.dedServ)
            {
                mutationInterface = new UserInterface();
                geneInterface     = new UserInterface();
                mutationBar       = new MutationBar();
                mutationBar.Activate();
                mutationInterface.SetState(mutationBar);

                geneUI = new GeneUI();
                geneUI.Activate();
            }
            am = new AttributeManager();
        }
Example #2
0
        public AgentLivingIndigo()
            : base()
        {
            AgentsRangeOfView = 20;

            #region Adding skills

            SkillsList.Add(Skills.Woodcutting);
            SkillsList.Add(Skills.Gathering);
            SkillsList.Add(Skills.Communicationing);
            SkillsList.Add(Skills.CampConstructing);

            #endregion

            #region Adding needs

            NeedFromCharacteristic.Add(CurrentState.Peacefulness, Needs.NeedAttack);
            NeedFromCharacteristic.Add(CurrentState.Health, Needs.NeedRest);
            NeedFromCharacteristic.Add(CurrentState.FoodSatiety, Needs.NeedEat);
            NeedFromCharacteristic.Add(CurrentState.Stamina, Needs.NeedRest);
            NeedFromCharacteristic.Add(CurrentState.Strenght, Needs.NeedRest);
            NeedFromCharacteristic.Add(CurrentState.WaterSatiety, Needs.NeedDrink);

            #endregion
        }
Example #3
0
 private static void Game_OnGameLoad(EventArgs args)
 {
     Console.WriteLine("Mata View - Rework is Loaded 2.0.0.0 [May, 9]");
     var menu = new MenuList();
     var skill = new SkillsList();
     var detect = new DetectMain();
 }
 public override void Unload()
 {
     am          = null;
     mutationBar = null;
     geneUI      = null;
     skillsList  = null;
     skill1      = null;
     skill2      = null;
     skill3      = null;
     skill4      = null;
     skill5      = null;
     skill6      = null;
     skill7      = null;
     skill8      = null;
 }
        public void loadLists(MerkatoDbContext context)
        {
            SelectListItem all = new SelectListItem()
            {
                Text = "(All)", Value = "0"
            };

            ClientList = context.Client.Select(p => new SelectListItem()
            {
                Text = p.ClientName, Value = p.Id.ToString()
            }).ToList();
            OutletList = context.Outlet.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
            GenderList = context.Gender.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
            GenderList.Add(all);
            SkillsList = context.SkillsProficiency.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
            SkillsList.Add(all);
            LanguageList = context.LanguageProficiency.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
            LanguageList.Add(all);
            GradeList = context.AgentGrade.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
            GradeList.Add(all);

            var query = (from PM in context.ProductMechanism
                         join M in context.Mechanism on PM.MechanismId equals M.Id
                         select new { ProductMechanism = PM, Mechanism = M })
                        .Select(p => new MechanismModel {
                Name = p.Mechanism.Name, Id = p.ProductMechanism.MechanismId
            }).ToList();

            MechanismList = query.Select(p => new SelectListItem()
            {
                Text = p.Name, Value = p.Id.ToString()
            }).ToList();
        }
Example #6
0
        public void Call(int skillIndex)
        {
            if (skillIndex > skills.Count)
            {
                Debug.LogError("Skill index out of range. Please, take a look on BindinsController.cs");
                return;
            }

            Vector3?   mouseProjected = getMouseProjectedPosition();
            SkillsList skillType      = skills[skillIndex];

            switch (skillType)
            {
            case SkillsList.empty:
                Debug.Log("Call empty skill");
                break;

            case SkillsList.walk:
                this.walkSkill.mouseProjected = mouseProjected;
                this.walkSkill.DoAction();
                break;

            case SkillsList.flameDash:
                this.flamedashSkill.mouseProjected = mouseProjected;
                this.flamedashSkill.DoAction();
                break;

            case SkillsList.throwArrow:
                this.attackBase.mouseProjected      = mouseProjected;
                this.throwArrowSkill.mouseProjected = mouseProjected;
                this.throwArrowSkill.pfArrow        = pfArrow;
                this.attackBase.DoActionBeforeCallback(this.throwArrowSkill);
                break;

            default:
                Debug.Log("Call default enum");
                break;
            }
        }
Example #7
0
 void Start()
 {
     sl = GetComponent <SkillsList>();
 }
Example #8
0
        public static void LoadQuests()
        {
            using (SQLiteConnection conn = new SQLiteConnection("Data Source=greyflare.db"))
            {
                conn.Open();
                SQLiteCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT * FROM Quests";
                using (SQLiteDataReader rdr = cmd.ExecuteReader())
                {
                    while (rdr.Read())
                    {
                        string name = rdr[1].ToString();
                        string desc = rdr[2].ToString();

                        string       rqstring  = rdr[3].ToString();
                        List <Quest> rqList    = new List <Quest>();
                        string[]     splstring = new string[] { "<>" };
                        if (rqstring != string.Empty)
                        {
                            string[] split = rqstring.Split(splstring, StringSplitOptions.RemoveEmptyEntries);
                            foreach (string s in split)
                            {
                                rqList.Add(QuestList.Find(x => x.QuestName == s));
                            }
                        }

                        string       rsstring = rdr[4].ToString();
                        List <Skill> rsList   = new List <Skill>();
                        if (rsstring != string.Empty)
                        {
                            string[] split = rsstring.Split(splstring, StringSplitOptions.RemoveEmptyEntries);
                            foreach (string s in split)
                            {
                                rsList.Add(SkillsList.Find(x => x.SkillName == s));
                            }
                        }

                        string          ristring = rdr[5].ToString();
                        List <GameItem> riList   = new List <GameItem>();
                        if (ristring != string.Empty)
                        {
                            string[] split = ristring.Split(splstring, StringSplitOptions.RemoveEmptyEntries);
                            foreach (string s in split)
                            {
                                riList.Add(ItemList[s]);
                            }
                        }

                        string          rwstring = rdr[6].ToString();
                        List <GameItem> rwList   = new List <GameItem>();
                        if (rwstring != string.Empty)
                        {
                            string[] split = rwstring.Split(splstring, StringSplitOptions.RemoveEmptyEntries);
                            foreach (string s in split)
                            {
                                rwList.Add(ItemList[s]);
                            }
                        }
                        bool iscomp = false;
                        if (rdr[7].ToString() == "true")
                        {
                            iscomp = true;
                        }
                        QuestList.Add(new Quest(name, desc, rqList, rsList, riList, rwList, iscomp));
                    }
                }
            }
        }