コード例 #1
0
        private void SetValueText(HeroAnyValue value, int indent, ListViewItem item)
        {
            string text = "";

            item.Tag = value;
            switch (value.Type.Type)
            {
            case HeroTypes.Id:
            {
                text = (value as HeroID).ValueText;
                HeroID oid = value as HeroID;
                if (GOM.Instance.Definitions.ContainsKey(oid.Id))
                {
                    object obj2 = text;
                    text = string.Concat(new object[] { obj2, " (", GOM.Instance.Definitions[oid.Id], ")" });
                }
                break;
            }

            case HeroTypes.Integer:
            {
                text = (value as HeroInt).ValueText;
                HeroInt num = value as HeroInt;
                if (GOM.Instance.Definitions.ContainsKey((ulong)num.Value))
                {
                    object obj3 = text;
                    text = string.Concat(new object[] { obj3, " (", GOM.Instance.Definitions[(ulong)num.Value], ")" });
                }
                break;
            }

            case HeroTypes.List:
            {
                HeroList list = value as HeroList;
                this.AddList(list, indent + 1);
                break;
            }

            case HeroTypes.LookupList:
            {
                HeroLookupList list2 = value as HeroLookupList;
                this.AddLookupList(list2, indent + 1);
                break;
            }

            case HeroTypes.Class:
            {
                HeroClass class2 = value as HeroClass;
                this.AddVariables(class2.Variables, indent + 1);
                break;
            }

            default:
                text = value.ValueText;
                break;
            }
            item.SubItems.Add(text);
        }
コード例 #2
0
        private void AddLookupList(HeroLookupList list, int indent)
        {
            int num = 1;

            foreach (KeyValuePair <HeroVarId, HeroAnyValue> pair in list.Data)
            {
                string str2;
                string text = "";
                switch (pair.Key.Value.Type.Type)
                {
                case HeroTypes.Id:
                {
                    text = (pair.Key.Value as HeroID).ValueText;
                    HeroID oid = pair.Key.Value as HeroID;
                    if (GOM.Instance.Definitions.ContainsKey(oid.Id))
                    {
                        object obj2 = text;
                        text = string.Concat(new object[] { obj2, " (", GOM.Instance.Definitions[oid.Id], ")" });
                    }
                    break;
                }

                case HeroTypes.Integer:
                {
                    text = (pair.Key.Value as HeroInt).ValueText;
                    HeroInt num2 = pair.Key.Value as HeroInt;
                    if (GOM.Instance.Definitions.ContainsKey((ulong)num2.Value))
                    {
                        object obj3 = text;
                        text = string.Concat(new object[] { obj3, " (", GOM.Instance.Definitions[(ulong)num2.Value], ")" });
                    }
                    break;
                }

                case HeroTypes.Enum:
                    text = (pair.Key.Value as HeroEnum).ValueText;
                    break;

                case HeroTypes.String:
                    text = (pair.Key.Value as HeroString).ValueText;
                    break;
                }
                ListViewItem item = this.listViewVariables.Items.Add(text);
                item.IndentCount = indent;
                num++;
                if (list.Type.Values != null)
                {
                    str2 = list.Type.Values.ToString();
                }
                else
                {
                    str2 = "";
                }
                item.SubItems.Add(str2);
                this.SetValueText(pair.Value, indent, item);
            }
        }
コード例 #3
0
ファイル: Hero.cs プロジェクト: ArthuriaDX/SAO
        public Image GetHeroImage(HeroImageTypes type)
        {
            switch (type)
            {
            case HeroImageTypes.Type_580_500:
            {
                return(Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                      ThereIsConstants.Path.DoubleSlash +
                                      HeroSerialize.FirstNameOfImage_580_500_File +
                                      HeroID.GetValue() + HeroSerialize.EndNameOfFile));
            }

            default:
            {
                return(null);
            }
            }
        }
コード例 #4
0
    // this attack is used by hero to switch weapon
    public void SwitchWeaponTextrue(string skinName, WeaponID weaponID, HeroID heroID)
    {
        // var weaponData = GDEManager.instance.GetData_Weapon((int)weaponID);
        // string boneName = "AtkPos_" + skinName;
        // m_BoneFollower.SetBone(boneName);
        // switch (heroID)
        // {
        //     case HeroID.SpaceKnight:
        //         {
        //             if (weaponData.AniType.ID == 0)
        //             {
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R", "Arm_R");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_L", "Arm_L");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_Hold", null);

        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun", skinName);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun_01", null);


        //             }
        //             else if (weaponData.AniType.ID == 1)
        //             {
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_L", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_Hold", "BothHand");

        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun_01", skinName);

        //             }
        //         }
        //         break;

        //     case HeroID.IdiotKnight:
        //         {
        //             if (weaponData.AniType.ID == 0)
        //             {
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_hold", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Armor3", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R3", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun_01", null);


        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun", skinName);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Armor", "Armor 2");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_R", "Hand_R");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R", "Arm_R");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_L", "Hand_L");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_L", "Arm_L");

        //             }
        //             else if (weaponData.AniType.ID == 1)
        //             {
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_hold", "Hand_hold");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Armor3", "Armor");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R3", "Arm_R");
        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun_01", skinName);


        //                 m_SkeAnimation.Skeleton.SetAttachment("Gun", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Armor", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_R", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_R", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Hand_L", null);
        //                 m_SkeAnimation.Skeleton.SetAttachment("Arm_L", null);

        //             }
        //         }
        //         break;

        //     default:
        //         break;
        // }
    }
コード例 #5
0
        public override void Execute()
        {
            int index = Utils.UnityRangeRandom(0, Heros.Count);

            Hero   = Heros[index];
            HeroID = Hero.Info.GetIntData(Consts.FN_ID);

            "log:AI chooset player card from {0} heros, selected index is {1}, id is {2}".Log(Heros.Count.ToString(), index.ToString(), HeroID.ToString());
        }
コード例 #6
0
 public void Load(BinaryReader reader)
 {
     Value = new HeroID(reader.ReadInt32(), reader.ReadInt32());
 }