상속: MonoBehaviour
 //Pager's PageChange event handler
 protected void MagicPager_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     using (_session = new Session())
     {
         QueryAndBindData(e.NewPageIndex, e.Pager.PageSize, false);
     }
 }
 public void CheckMagic(Magic m)
 {
     Magic got = ReadMagic();
     if (got == m)
         return;
     throw new InvalidDataException("expected magic '" + m + "', got '" + got + "'");
 }
예제 #3
0
 private void Awake()
 {
     // get references
     player = GetComponent<Player>();
     health = GetComponent<Health>();
     magic = GetComponent<Magic>();
     //statManager = player.myStats;
 }
 void odometryProcessor_OdometryUpdate(object sender, Magic.Common.TimestampedEventArgs<Magic.Common.RobotPose> e)
 {
     curTS = e.TimeStamp;
     if (NewPoseAvailable != null)
         NewPoseAvailable(this, new NewPoseAvailableEventArgs(odometryProcessor.CurrentState));
     if (NewOdomAvailable != null)
         NewOdomAvailable(this, new Magic.Common.TimestampedEventArgs<RobotPose>(curTS, odometryProcessor.CurrentState));
 }
예제 #5
0
 /// <summary>
 /// 添加用户
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public override bool Add(Magic.Mvc.Model.Model model)
 {
     var m = model as Models.User;
     if (m == null) throw new ArgumentNullException();
     var user = this.GetModel(string.Format("[UserName]='{0}'", m.UserName));
     if (user != null) throw new Exception("该账户已存在!");
     return base.Add(model);
 }
예제 #6
0
 protected void MagicPager_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     this.magicPagerSub.PageSize = this.magicPagerMain.PageSize; //如果页面有2个翻页控件,则必须写上这一句(控件bug)
     using (ISession session = new Session())
     {
         this.QueryAndBindData(session, this.magicPagerMain.PageSize, e.NewPageIndex, false);
     }
 }
 protected void MagicPager_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     this.magicPagerSub.PageSize = this.magicPagerMain.PageSize;
     using (ISession session = new Session())
     {
         this.QueryAndBindData(session, e.NewPageIndex, e.Pager.PageSize, false);
     }
 }
	public void Awake()
	{
		hand = GameObject.FindGameObjectWithTag ("hand");
		neck = GameObject.FindGameObjectWithTag ("neck");
		head = GameObject.FindGameObjectWithTag ("head");
		MagicFactory.AddMagic ("throw", 0);
		magic = MagicFactory.GetMagic ("throw");
		scale = CalculateDistance ();
	}
 protected void MagicPager_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     //��ҳ�¼�
     this.magicPagerSub.PageSize = this.magicPagerMain.PageSize; //���ҳ����2����ҳ�ؼ��������д����һ��(�ؼ�bug)
     using (ISession session = new Session())
     {
         QueryAndBindData(session, e.NewPageIndex, e.Pager.PageSize, false);
     }
 }
 public string TransPropertyText(Magic.ERP.TransProperty property)
 {
     switch (property)
     {
         case Magic.ERP.TransProperty.In: return "入";
         case Magic.ERP.TransProperty.Out: return "出";
     }
     return "";
 }
예제 #11
0
 protected void mpage_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     this.mPageSub.PageSize = this.mpage.PageSize;//如果页面有2个翻页控件,则必须写上这一句(控件bug)
     int pageIndex = e.NewPageIndex;
     using (ISession session = new Session())
     {
         QueryAndBindDate(session, pageIndex, this.mpage.PageSize, false);
     }
 }
예제 #12
0
 protected void MagicPager_PageChanged(object src, Magic.Web.UI.PageChangedEventArgs e)
 {
     //翻页事件
     this.magicPagerMain.CurrentPageIndex = this.magicPagerSub.CurrentPageIndex = e.NewPageIndex;
     this.magicPagerSub.PageSize = this.magicPagerMain.PageSize; //如果页面有2个翻页控件,则必须写上这一句(控件bug)
     using (ISession session = new Session())
     {
         QueryAndBindData(session);
     }
 }
	public void Awake()
	{
		skeletonController = FindObjectOfType(typeof(RUISSkeletonController)) as RUISSkeletonController;
		skeletonManager = FindObjectOfType(typeof(RUISSkeletonManager)) as RUISSkeletonManager;
		hand = GameObject.FindGameObjectWithTag ("hand");
		shoulder = GameObject.FindGameObjectWithTag ("Shoulder");
		head = GameObject.FindGameObjectWithTag ("head");
		MagicFactory.AddMagic ("throw", 0);
		magic = MagicFactory.GetMagic ("throw");
		scale = CalculateDistance ();
	}
예제 #14
0
    void Awake()
    {
        instance = this;

        _xpAddable = true;

        _maxExperience = 400;
        _currentExperience = 0;
        _nextExperience = Random.Range(490f, 510f);

        _playerHP = GetComponent<Health>();
        _playerMP = GetComponent<Magic>();
    }
예제 #15
0
	void Start () {
        ZombAll = GameObject.Find("ZombieLogic");
        modeGame = Application.loadedLevelName;
        magicClass = ZombAll.GetComponent<Magic>();
        lanternObj = GameObject.Find("Lantern");

		_helthRect = new Rect (10, 0, 190, 50);
        _armourRect = new Rect(10, 40, 190, 50);
        _accountRect = new Rect(Screen.width - 160, 0, 180, 30);
		_leftInfoRect = new Rect (0, 0, 195, 193);
		_rightInfoRect = new Rect (Screen.width - 188, 0, 188, 48);
        _deathRect = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200);
        _pauseButtonRect = new Rect(10, 100, 70, 72);
        _pauseRect = new Rect(Screen.width / 2 - 250, Screen.height / 2 - 150, 500, 300);
        _logBonus = new Rect(170, 0, 200, 200);

        _lanternRect = new Rect(10, 200, 50, 40);

        _liveActorRect = new Rect(105, 110, 40, 40);
        _helthResetRect = new Rect(75, 140, 40, 35);


        _weaponsRect = new Rect(Screen.width - 100, 50, 100, 40);
        _weaponsBulletRect = new Rect(Screen.width - 90, 80, 40, 30);
        _arrowRightWeaponsRect = new Rect(Screen.width - 70, 100, 40, 40);
        _arrowLeftWeaponsRect = new Rect(Screen.width - 130, 100, 40, 40);

        _exitRect = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 50, 200, 100);

        if (gameMode == GameMode.arena)
        {

            _magic1Rect = new Rect(Screen.width - 80, 50, 50, 50);
            _magic2Rect = new Rect(Screen.width - 80, 110, 50, 50);
            _magic3Rect = new Rect(Screen.width - 80, 170, 50, 50);
            _magic4Rect = new Rect(Screen.width - 80, 230, 50, 50);

        }
        else
        {
            _magic1Rect = new Rect(Screen.width - 80, 135, 50, 50);
            _magic2Rect = new Rect(Screen.width - 80, 195, 50, 50);
            _magic3Rect = new Rect(Screen.width - 80, 255, 50, 50);
            _magic4Rect = new Rect(Screen.width - 80, 315, 50, 50);
        }

        if (!pause)
                Time.timeScale = 1;
	}
    public void heatPeltier(Magic.Size size)
    {
        int temp;

        switch (size) {
            case Magic.Size.Small:
                temp = 5;
                break;
            case Magic.Size.Medium:
                temp = 10;
                break;
            default:
                temp = 15;
                break;
        }
        sendData("\"temperature\": " +  temp.ToString(), PELTIER);
    }
예제 #17
0
파일: Reader.cs 프로젝트: Norbyte/lslib
        public void Read(object root)
        {
            using (this.InputReader = new BinaryReader(InputStream))
            {
                Magic = ReadMagic();

                if (Magic.format != Magic.Format.LittleEndian32 && Magic.format != Magic.Format.LittleEndian64)
                    throw new ParsingException("Only little-endian GR2 files are supported");

                Header = ReadHeader();
                for (int i = 0; i < Header.numSections; i++)
                {
                    var section = new Section();
                    section.Header = ReadSectionHeader();
                    Sections.Add(section);
                }

                Debug.Assert(InputStream.Position == Magic.headersSize);

                UncompressStream();

                foreach (var section in Sections)
                {
                    ReadSectionRelocations(section);
                }

                if (Magic.IsLittleEndian != BitConverter.IsLittleEndian)
                {
                    // TODO: This should be done before applying relocations?
                    foreach (var section in Sections)
                    {
                        ReadSectionMixedMarshallingRelocations(section);
                    }
                }

                var rootStruct = new StructReference();
                rootStruct.Offset = Sections[(int)Header.rootType.Section].Header.offsetInFile + Header.rootType.Offset;

                Seek(Header.rootNode);
                ReadStruct(rootStruct.Resolve(this), MemberType.Inline, root, null);
            }
        }
        void robot_WheelSpeedUpdate(object sender, Magic.Common.TimestampedEventArgs<IRobotTwoWheelStatus> e)
        {
            lastVelTS = velTS;
            lastRWheelVel = rWheelVel;
            lastLWheelVel = lWheelVel;
            rWheelVel = e.Message.RightWheelSpeed;
            lWheelVel = e.Message.LeftWheelSpeed;
            velTS = e.TimeStamp;

            if ((velTS - lastVelTS) > 0)
            {
                rWheelAccel = (rWheelVel - lastRWheelVel) / (velTS - lastVelTS);
                lWheelAccel = (lWheelVel - lastLWheelVel) / (velTS - lastVelTS);
            }
            else
            {
                rWheelAccel = 0;
                lWheelAccel = 0;
            }
        }
예제 #19
0
 private void MagicEditor_Load(object sender, EventArgs e)
 {
     string ext = "._dt";
     string textPath = @"E:\Program Files\Joyoland\ed_zero\data\text\";
     using (var stream = File.OpenRead(textPath + "t_magic" + ext))
     using (var reader = new BinaryReader(stream))
     {
         ushort end = reader.ReadUInt16();
         ushort pos = end;
         List<ushort> lp = new List<ushort>();
         do
         {
             lp.Add(pos);
             pos = reader.ReadUInt16();
         } while (stream.Position < end);
         //lp.Add(pos);
         foreach (var p in lp)
         {
             Magic magic = new Magic();
             stream.Seek(p, SeekOrigin.Begin);
             byte[] buffer = new byte[Marshal.SizeOf(typeof(MagicField))];
             stream.Read(buffer, 0, buffer.Length);
             var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
             try
             {
                 magic.Field = (MagicField)
                     Marshal.PtrToStructure(Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), typeof(MagicField));
             }
             finally
             {
                 handle.Free();
             }
             if (magic.Field.Type == 0) continue;
             stream.Seek(magic.Field.Str1, SeekOrigin.Begin);
             magic.Name = ReadString(stream);
             stream.Seek(magic.Field.Str2, SeekOrigin.Begin);
             magic.Description = ReadString(stream);
             listBox1.Items.Add(magic);
         }
     }
 }
예제 #20
0
        void camera_ImageReceived(object sender, Magic.Common.TimestampedEventArgs<Magic.Common.Sensors.RobotImage> e)
        {
            int robotID = e.Message.robotID;
            if (robotID >= 5)
                robotID -= 4;

            // e.Timestamp is not the actual time stamp you want !!
            if (!robotIDToImageList.ContainsKey(robotID))
            {
                robotIDToImageList.Add(robotID, new List<RobotImage>(200));
                mostRecentTimeStamp.Add(robotID, e.Message.timeStamp);
            }

            if (robotIDToImageList[robotID].Count == robotIDToImageList[robotID].Capacity)
                robotIDToImageList[robotID].RemoveAt(0);
            robotIDToImageList[robotID].Add(e.Message);

            if (!robotImageDict.ContainsKey(robotID))
                robotImageDict.Add(robotID, robotIDToImageList[robotID][robotIDToImageList[robotID].Count - 1]);
            mostRecentTimeStamp[robotID] = e.Message.timeStamp; // keep track of the most recent timestamp
        }
예제 #21
0
 protected void mboor_ItemCommand(object sender, Magic.Web.UI.MagicItemEventArgs args)
 {
     if (args.CommandName == "delete")
     {
         using (ISession session = new Session())
         {
             session.BeginTransaction();
             try
             {
                 bool deleted = false;
                 foreach (RepeaterItem item in this.rInfo.Items)
                 {
                     HtmlInputCheckBox chk = item.FindControl("chkItem") as HtmlInputCheckBox;
                     if (chk != null && chk.Checked && Cast.Int(chk.Value) > 0)
                     {
                         Magic.Basis.ItemSpec spec = ItemSpec.Retrieve(session, Cast.Int(chk.Value));
                         ItemMaster master = ItemMaster.Retrieve(session, spec.ItemID);
                         if (master.ItemType == ItemType.AssistantItem)
                         {
                             if (spec != null) spec.Delete(session);
                             if (master != null) master.Delete(session);
                             deleted = true;
                         }
                     }
                 }
                 session.Commit();
                 if (deleted) this.QueryAndBindDate(session, this.mpage.CurrentPageIndex, this.mpage.PageSize, true);
                 WebUtil.ShowMsg(this, "选择的辅料已经被删除", "操作成功");
             }
             catch (Exception err)
             {
                 session.Rollback();
                 WebUtil.ShowError(this, err);
             }
             this.QueryAndBindDate(session, this.mpage.CurrentPageIndex, this.mpage.PageSize, true);
         }
     }
 }
예제 #22
0
	public override void OnInspectorGUI()
	{
		magic = ((MagicComp)target).Magic;

		for (var i = 0; i < magic.Spells.Count; i++)
		{
			var spell = magic.Spells[i];

			spell.Name = EditorGUILayout.TextField("Name", spell.Name);
			spell.Power = EditorGUILayout.FloatField("Power", spell.Power);

			EditorGUILayout.Separator();
		}

	    if (GUILayout.Button("Add Spell"))
	    {
	        magic.Spells.Add(new Spell());
	    }
	    if (GUILayout.Button("Clear"))
	    {
	        magic.Spells.Clear();
	    }
	}
예제 #23
0
 public Magic ReadMagic()
 {
     if (_peek == Magic.Invalid)
         return (Magic)_br.ReadByte();
     Magic retv = _peek;
     _peek = Magic.Invalid;
     return retv;
 }
예제 #24
0
파일: Writer.cs 프로젝트: Norbyte/lslib
 private void WriteMagic(Magic magic)
 {
     Writer.Write(magic.signature);
     Writer.Write(magic.headersSize);
     Writer.Write(magic.headerFormat);
     Writer.Write(magic.reserved1);
     Writer.Write(magic.reserved2);
 }
예제 #25
0
 /// <summary>
 /// 传送: 随意移动到任意节点,恢复该节点的全部魔力
 /// </summary>
 /// <param name="m"></param>
 void transport(ref Magic m)
 {
     magicCore.setFlag(ClickFlag.transport);
 }
예제 #26
0
 /// <summary>
 /// 静电体 : 每次释放一个技能,恢复任意节点1点魔力
 /// </summary>
 /// <param name="m"></param>
 void staticElectricity(ref Magic m)
 {
     magicCore.addBuff(buffTool.getBuff(BuffName.静电体), -1);
 }
예제 #27
0
파일: Writer.cs 프로젝트: Norbyte/lslib
        public byte[] Write(object root)
        {
            using (this.Writer = new BinaryWriter(Stream))
            {
                this.Magic = InitMagic();
                WriteMagic(Magic);

                this.Header = InitHeader();
                WriteHeader(Header);

                for (int i = 0; i < Header.numSections; i++)
                {
                    var section = new WritableSection((SectionType)i, this);
                    WriteSectionHeader(section.Header);
                    Sections.Add(section);
                }

                Magic.headersSize = (UInt32)Stream.Position;

                CurrentSection = Sections[(int)SectionType.Main];
                CurrentSection.WriteStruct(root);

                while (ArrayWrites.Count > 0 || StructWrites.Count > 0 || StringWrites.Count > 0)
                {
                    FlushPendingWrites();
                }

                foreach (var defn in Types.Values)
                {
                    Sections[(int)SectionType.Discardable].WriteStructDefinition(defn);
                }

                // We need to do this again to flush strings written by WriteMemberDefinition()
                FlushPendingWrites();

                FinalizeOffsets();

                foreach (var section in Sections)
                {
                    section.Header.first16bit = (UInt32)section.MainStream.Length;
                    section.Header.first8bit = (UInt32)section.MainStream.Length;
                    section.Finish();
                }

                var relocSection = Sections[(int)SectionType.Discardable];
                foreach (var section in Sections)
                {
                    relocSection.WriteSectionRelocations(section);
                    relocSection.WriteSectionMixedMarshallingRelocations(section);
                }

                foreach (var section in Sections)
                {
                    // Pad section size to a multiple of 4
                    while (section.MainStream.Position % 4 > 0)
                        section.Writer.Write((Byte)0);

                    section.MainStream.Flush();
                    section.Header.offsetInFile = (UInt32)Stream.Position;
                    section.Header.uncompressedSize = (UInt32)section.MainStream.Length;
                    section.Header.compressedSize = (UInt32)section.MainStream.Length;
                    Writer.Write(section.MainStream.ToArray());
                }

                foreach (var section in Sections)
                {
                    section.Header.relocationsOffset += relocSection.Header.offsetInFile;
                    section.Header.mixedMarshallingDataOffset += relocSection.Header.offsetInFile;
                }

                var rootStruct = LookupStructDefinition(root.GetType());
                Header.rootType = ObjectOffsets[rootStruct];
                Header.rootNode = new SectionReference(SectionType.Main, 0);
                Header.fileSize = (UInt32)Stream.Length;

                Stream.Seek(Magic.MagicSize + Header.HeaderSize, SeekOrigin.Begin);

                foreach (var section in Sections)
                {
                    WriteSectionHeader(section.Header);
                }

                Header.crc = Header.CalculateCRC(Stream);
                Stream.Seek(0, SeekOrigin.Begin);
                WriteMagic(Magic);
                WriteHeader(Header);

                return Stream.ToArray();
            }
        }
예제 #28
0
 void doNull(ref Magic m)
 {
 }
예제 #29
0
 /// <summary>
 /// 均衡之息,获得一点攻击和一点防御
 /// </summary>
 /// <param name="m"></param>
 void BalanceBreath(ref Magic m)
 {
     magicCore.setDEF(magicCore.getDEF() + 1);
     magicCore.setATK(magicCore.getATK() + 1);
 }
예제 #30
0
 /// <summary>
 /// 重力:伤害值为怪物当前生命值的40%
 /// </summary>
 /// <param name="m"></param>
 void Gravity(ref Magic m)
 {
     m.skill.addbasic = magicCore.getMonsterMaxHp(m.target) * 0.4f;
 }
예제 #31
0
    /// <summary>
    /// 奥数护盾:为当前节点施加节点保护
    /// </summary>
    /// <param name="m"></param>
    void MagicShelden(ref Magic m)
    {
        int pos = magicCore.getRoute()[m.magicRoute[0]].pEnd;

        magicCore.getPoint(pos).isProtected = true;
    }
예제 #32
0
 internal void Set(Object o)
 {
     item = Magic.addressOf(o);
 }
예제 #33
0
 internal Object Get()
 {
     return(Magic.fromAddress(item));
 }
예제 #34
0
 internal HandleTable GetTable()
 {
     return((HandleTable)Magic.fromAddress(table));
 }
예제 #35
0
 internal void SetTable(HandleTable ht)
 {
     table = Magic.addressOf(ht);
 }
예제 #36
0
        public void SaveInXML(XmlElement parentNode, CandleChartControl owner)
        {
            var node = parentNode.AppendChild(parentNode.OwnerDocument.CreateElement("Asterisk"));

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Name")).Value = Name;

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Text")).Value  = Text;
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Sign")).Value  = Sign;
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("magic")).Value = Magic.ToString();

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ColorLine")).Value = ColorLine.ToArgb().ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ColorFill")).Value = ColorFill.ToArgb().ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ColorText")).Value = ColorText.ToArgb().ToString();

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Price")).Value = Price.ToString(CultureProvider.Common);
            if (DateStart.HasValue)
            {
                node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("PivotTime")).Value =
                    DateStart.Value.ToString("ddMMyyyy HHmmss", CultureProvider.Common);
            }
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Shape")).Value        = Shape.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Transparency")).Value =
                Transparency.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("TransparencyText")).Value =
                TransparencyText.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Radius")).Value =
                Radius.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("magic")).Value = Magic.ToString();
        }
예제 #37
0
 /// <summary>
 /// 冰封节点:消耗该节点一半的魔力,为所选节点添加保护状态
 /// </summary>
 /// <param name="m"></param>
 void lockPoint(ref Magic m)
 {
     magicCore.setFlag(ClickFlag.lockPoint);
 }
예제 #38
0
파일: AwcFile.cs 프로젝트: rt-2/CodeWalker
        public void Load(byte[] data, RpfFileEntry entry)
        {
            //adapted from libertyV code


            //MemoryStream ms = new MemoryStream(data);
            Name      = entry.Name;
            FileEntry = entry;
            Data      = data;

            if ((data == null) || (data.Length < 8))
            {
                ErrorMessage = "Data null or too short!";
                return; //nothing to do, not enough data...
            }

            Magic = BitConverter.ToUInt32(data, 0);

            Endianess endianess = Endianess.LittleEndian;

            switch (Magic)
            {
            default:
                ErrorMessage = "Unexpected Magic 0x" + Magic.ToString("X");
                return;

            case 0x54414441:
                endianess = Endianess.LittleEndian;
                break;

            case 0x41444154:
                endianess = Endianess.BigEndian;
                break;
            }

            using (MemoryStream ms = new MemoryStream(data))
            {
                DataReader r = new DataReader(ms, endianess);

                Magic       = r.ReadUInt32();
                Version     = r.ReadUInt16();
                Flags       = r.ReadUInt16();
                StreamCount = r.ReadInt32();
                InfoOffset  = r.ReadInt32();


                //notes from libertyV:
                // first bit - means that there are unknown word for each stream after this header
                // second bit - I think that it means that not all the tags are in the start of the file, but all the tags of a stream are near the data tag
                // third bit - Multi channel audio

                if ((Flags >> 8) != 0xFF)
                {
                    ErrorMessage = "Flags 0 not supported!";
                    return;
                }
                if ((Flags & 0xF8) != 0)
                {
                    //ErrorMessage = "Flags 1 not supported!";
                    //return;
                }

                MultiChannel = ((Flags & 4) == 4);


                var flag0     = ((Flags & 1) == 1);
                var infoStart = 16 + (flag0 ? (StreamCount * 2) : 0);

                ms.Position = infoStart;

                List <AwcStreamInfo>             infos    = new List <AwcStreamInfo>();
                Dictionary <uint, AwcStreamInfo> infoDict = new Dictionary <uint, AwcStreamInfo>();
                List <uint>     audioIds = new List <uint>();
                List <AwcAudio> audios   = new List <AwcAudio>();

                for (int i = 0; i < StreamCount; i++)
                {
                    var info = new AwcStreamInfo(r);
                    infos.Add(info);
                    infoDict[info.Id] = info;
                }
                for (int i = 0; i < StreamCount; i++)
                {
                    var info = infos[i];
                    for (int j = 0; j < info.TagCount; j++)
                    {
                        var chunk = new AwcChunkInfo(r);
                        info.Chunks[chunk.Tag] = chunk;
                    }
                }

                StreamInfos = infos.ToArray();



                byte hformat = 0xFA; // 250  0x6061D4FA & 0xFF; //JenkHash.GenHash("format");
                byte hdata   = 0x55; // 85  0x5EB5E655 & 0xFF; //JenkHash.GenHash("data");
                byte hycd    = 0x5C; // 92  YCD resource chunk... lip sync anims?
                byte hunk    = 0x36; // 54  unk chunk? small number of bytes (2+)



                if (MultiChannel)
                {
                    AwcStreamInfo stream0 = null;
                    if (!infoDict.TryGetValue(0, out stream0))
                    {
                        ErrorMessage = "Couldn't find MultiChannel stream0";
                        return;
                    }

                    AwcChunkInfo chunk72 = null;
                    if (!stream0.Chunks.TryGetValue(72, out chunk72))
                    {
                        ErrorMessage = "Couldn't find MultiChannel chunk72";
                        return;
                    }

                    ms.Position = chunk72.Offset;

                    AwcChannelChunkInfo chanInfo = new AwcChannelChunkInfo(r);
                    if (chanInfo.ChannelCount != StreamCount - 1)
                    {
                        ErrorMessage = "Channel Count did not match Stream Count";
                        return;
                    }

                    List <AwcChannelChunkItemInfo> chunkItems = new List <AwcChannelChunkItemInfo>();
                    for (int i = 0; i < chanInfo.ChannelCount; i++)
                    {
                        var itemInfo = new AwcChannelChunkItemInfo(r);
                        chunkItems.Add(itemInfo);
                        audioIds.Add(infos[i + 1].Id);
                    }

                    //AudioStreams.Add(new MultiChannelAudio(new ChunkStream(this.Stream, streamsChunks[0][Tag("data")]), channelsInfoHeader, streamsInfo, header.BigEndian));

                    AwcChunkInfo cdata = null;
                    if (!stream0.Chunks.TryGetValue(hdata, out cdata))
                    {
                        ErrorMessage = "Couldn't find Stream 0 data chunk";
                        return;
                    }

                    ms.Position = cdata.Offset;
                    var lastPos = cdata.Offset + cdata.Size;
                    //int chunkSize = 0x800;
                    uint bigChunkSize = chanInfo.ChunkSize;
                    var  chanCount    = chanInfo.ChannelCount;

                    MultiChannelData = r.ReadBytes(cdata.Size);
                    ms.Position      = cdata.Offset;

                    //var d = data;//temporary

                    ////this doesn't seem to work :(
                    //while (ms.Position < lastPos)
                    //{
                    //    uint totalChunks = 0;
                    //    var startPos = ms.Position;
                    //    var curPos = startPos;
                    //    //byte[] chunkdata = r.ReadBytes(chunkSize);
                    //    //ms.Position = startPos;
                    //    AwcChannelChunkHeader[] chanHeaders = new AwcChannelChunkHeader[chanCount];
                    //    for (int i = 0; i < chanCount; i++)
                    //    {
                    //        var chanHeader = new AwcChannelChunkHeader(r);
                    //        chanHeaders[i] = chanHeader;
                    //        totalChunks += chanHeader.ChunkCount;
                    //    }
                    //    int headerSize = (int)(totalChunks * 4 + chanInfo.ChannelCount * AwcChannelChunkHeader.Size);
                    //    headerSize += (((-headerSize) % chunkSize) + chunkSize) % chunkSize; //todo: simplify this!
                    //    curPos += headerSize;
                    //    AwcChannelChunk[] chanChunks = new AwcChannelChunk[chanCount];
                    //    for (int i = 0; i < chanCount; i++)
                    //    {
                    //        var chanChunk = new AwcChannelChunk(r, chanHeaders[i], chunkItems[i]);
                    //        chanChunks[i] = chanChunk;
                    //        curPos += chanChunk.TotalDataSize;
                    //    }
                    //    if (curPos - startPos > chanInfo.ChunkSize)
                    //    {
                    //        ErrorMessage = "Chunk was bigger than the chunk size";
                    //        break;
                    //    }
                    //    if ((totalChunks == 0) || ((startPos + chanInfo.ChunkSize) > lastPos))
                    //    {
                    //        ErrorMessage = "Unable to read chunk";
                    //        break;
                    //    }
                    //    var newPos = startPos + bigChunkSize;
                    //    if (newPos >= lastPos) break;
                    //    ms.Position = newPos;
                    //}
                }
                else
                {
                    for (int i = 0; i < StreamCount; i++)
                    {
                        var info = infos[i];

                        AwcChunkInfo cformat = null;
                        if (!info.Chunks.TryGetValue(hformat, out cformat))
                        {
                            ErrorMessage = "Couldn't find Stream " + i.ToString() + " format chunk";
                            continue;
                        }

                        AwcChunkInfo cdata = null;
                        if (!info.Chunks.TryGetValue(hdata, out cdata))
                        {
                            ErrorMessage = "Couldn't find Stream " + i.ToString() + " data chunk";
                            continue;
                        }

                        AwcChunkInfo         cycd = null;
                        AwcAudioAnimClipDict oycd = null;
                        if (info.Chunks.TryGetValue(hycd, out cycd))
                        {
                            ms.Position = cycd.Offset;
                            oycd        = new AwcAudioAnimClipDict(r, cycd);
                        }

                        AwcChunkInfo cunk = null;
                        AwcAudioUnk  ounk = null;
                        if (info.Chunks.TryGetValue(hunk, out cunk))
                        {
                            ms.Position = cunk.Offset;
                            ounk        = new AwcAudioUnk(r, cunk);
                        }


                        ms.Position = cformat.Offset;
                        AwcFormatChunk formatChunk = new AwcFormatChunk(r);

                        ms.Position = cdata.Offset;
                        AwcAudio audio = new AwcAudio(r, info, formatChunk, cdata);

                        audio.ClipDict = oycd;
                        audio.UnkData  = ounk;

                        audios.Add(audio);
                        audioIds.Add(info.Id);
                    }
                }


                Audios   = audios.ToArray();
                AudioIds = audioIds.ToArray();
            }
        }
예제 #39
0
        public void SaveInXML(XmlElement parentNode, CandleChartControl owner)
        {
            var node = parentNode.AppendChild(parentNode.OwnerDocument.CreateElement("Marker"));

            var attrName = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("name"));

            attrName.Value = Name;

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("magic")).Value = Magic.ToString();

            var attrPrice = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("price"));

            attrPrice.Value = Price.ToString(CultureProvider.Common);

            var attrComment = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("comment"));

            attrComment.Value = Comment;

            var attrType = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("type"));

            attrType.Value = MarkerType.ToString();

            var attrSide = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("side"));

            attrSide.Value = Side.ToString();

            var time = dateStart == new DateTime()
                ? owner.chart.StockSeries.GetCandleOpenTimeByIndex((int)candleIndex) : dateStart;
            var attrStart = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("time"));

            attrStart.Value = time.ToString("ddMMyyyy HHmmss", CultureProvider.Common);

            var attrId = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("id"));

            attrId.Value = id.ToString();

            if (exitPair.HasValue)
            {
                var attrExitId = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("exitId"));
                attrExitId.Value = exitPair.ToString();
            }
        }
예제 #40
0
    private Magic CreateHealMagic(Transform spawnPoint)
    {
        Magic i = Instantiate(blankHealMagPrefab, spawnPoint.position, spawnPoint.transform.rotation) as Magic;

        return(i);
    }
예제 #41
0
 /// <summary>
 /// 火花魔术 : 附加伤害效果
 /// </summary>
 /// <param name="m"></param>
 void Flame(ref Magic m)
 {
     magicCore.addBuff(buffTool.getBuff(BuffName.附加伤害), -1);
 }
예제 #42
0
        private static void LoadGameLibraries()
        {
            Count = MapLibs.Length + Monsters.Length + Gates.Length + NPCs.Length + CArmours.Length +
                    CHair.Length + CWeapons.Length + CWeaponEffect.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length +
                    ARArmours.Length + ARHair.Length + ARWeapons.Length + ARWeaponsS.Length +
                    CHumEffect.Length + AHumEffect.Length + ARHumEffect.Length + Mounts.Length + Fishing.Length + Pets.Length +
                    Transform.Length + TransformMounts.Length + TransformEffect.Length + TransformWeaponEffect.Length + 17;

            Dragon.Initialize();
            Progress++;

            BuffIcon.Initialize();
            Progress++;

            Help.Initialize();
            Progress++;

            MiniMap.Initialize();
            Progress++;

            MagIcon.Initialize();
            Progress++;
            MagIcon2.Initialize();
            Progress++;

            Magic.Initialize();
            Progress++;
            Magic2.Initialize();
            Progress++;
            Magic3.Initialize();
            Progress++;
            MagicC.Initialize();
            Progress++;

            Effect.Initialize();
            Progress++;

            GuildSkill.Initialize();
            Progress++;

            Background.Initialize();
            Progress++;

            Deco.Initialize();
            Progress++;

            Items.Initialize();
            Progress++;
            StateItems.Initialize();
            Progress++;
            FloorItems.Initialize();
            Progress++;

            for (int i = 0; i < MapLibs.Length; i++)
            {
                if (MapLibs[i] == null)
                {
                    MapLibs[i] = new MLibrary("");
                }
                else
                {
                    MapLibs[i].Initialize();
                }
                Progress++;
            }

            for (int i = 0; i < Monsters.Length; i++)
            {
                Monsters[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Gates.Length; i++)
            {
                Gates[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < NPCs.Length; i++)
            {
                NPCs[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < CArmours.Length; i++)
            {
                CArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CHair.Length; i++)
            {
                CHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CWeapons.Length; i++)
            {
                CWeapons[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CWeaponEffect.Length; i++)
            {
                CWeaponEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AArmours.Length; i++)
            {
                AArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AHair.Length; i++)
            {
                AHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AWeaponsL.Length; i++)
            {
                AWeaponsL[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AWeaponsR.Length; i++)
            {
                AWeaponsR[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARArmours.Length; i++)
            {
                ARArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARHair.Length; i++)
            {
                ARHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARWeapons.Length; i++)
            {
                ARWeapons[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARWeaponsS.Length; i++)
            {
                ARWeaponsS[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CHumEffect.Length; i++)
            {
                CHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AHumEffect.Length; i++)
            {
                AHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARHumEffect.Length; i++)
            {
                ARHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Mounts.Length; i++)
            {
                Mounts[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < Fishing.Length; i++)
            {
                Fishing[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Pets.Length; i++)
            {
                Pets[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Transform.Length; i++)
            {
                Transform[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < TransformEffect.Length; i++)
            {
                TransformEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < TransformWeaponEffect.Length; i++)
            {
                TransformWeaponEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < TransformMounts.Length; i++)
            {
                TransformMounts[i].Initialize();
                Progress++;
            }

            Loaded = true;
        }
예제 #43
0
 /// <summary>
 /// 电容火花 : 下次技能的伤害倍率变为两倍
 /// </summary>
 /// <param name="m"></param>
 void capacitance(ref Magic m)
 {
     magicCore.addBuff(buffTool.getBuff(BuffName.电容火花), -1);
 }
예제 #44
0
    void OnCollisionEnter(Collision collision)
    {
        if (this.gameObject.name == "Magic Missile(Clone)" ||
            this.gameObject.name == "Fireball(Clone)" ||
            this.gameObject.name == "Ricochet Magic(Clone)")
        {
            ParticleSystem g = (ParticleSystem)Instantiate(onCollisionEffect, transform.position, Quaternion.identity);
            if (this.gameObject.name == "Fireball(Clone)")
            {
                ParticleSystem f = (ParticleSystem)Instantiate(onCollisionEffect, new Vector3(transform.position.x + screenWidth, transform.position.y, transform.position.z), Quaternion.identity);
                ParticleSystem d = (ParticleSystem)Instantiate(onCollisionEffect, new Vector3(transform.position.x - screenWidth, transform.position.y, transform.position.z), Quaternion.identity);
                ParticleSystem s = (ParticleSystem)Instantiate(onCollisionEffect, new Vector3(transform.position.x, transform.position.y + screenHeight, transform.position.z), Quaternion.identity);
                ParticleSystem a = (ParticleSystem)Instantiate(onCollisionEffect, new Vector3(transform.position.x, transform.position.y - screenHeight, transform.position.z), Quaternion.identity);

                Destroy(f.gameObject, onCollisionEffect.duration);
                Destroy(d.gameObject, onCollisionEffect.duration);
                Destroy(s.gameObject, onCollisionEffect.duration);
                Destroy(a.gameObject, onCollisionEffect.duration);
            }
            Destroy(g.gameObject, onCollisionEffect.duration);

            //Vector3 xOffset = transform.position;
            //xOffset.x = (((Screen.width * 2) / 3) % Screen.width);
            //ParticleSystem gx = (ParticleSystem)Instantiate(onCollisionEffect, xOffset, Quaternion.identity);
            //Destroy(gx.gameObject, onCollisionEffect.duration);
            //
            //Vector3 yOffset = new Vector3();
            //yOffset.y = (Screen.height % ((Screen.height * 2) / 3));
            //ParticleSystem gy = (ParticleSystem)Instantiate(onCollisionEffect, transform.position + yOffset, Quaternion.identity);
            //Destroy(gy.gameObject, onCollisionEffect.duration);
        }
        if (this.gameObject.name == "Fireball(Clone)")
        {
            Vector2 start = new Vector2(1, 0);
            int     count = 16;

            GameObject   getSound = GameObject.Find("SoundManager");
            SoundManager SM       = getSound.GetComponent <SoundManager>();
            SM.playFireBallExplosion();

            for (int i = 0; i < count; i++)
            {
                CharacterProjectile cp    = owningChar.transform.root.GetComponent <CharacterProjectile>();
                Controller          con   = owningChar.transform.root.GetComponent <Controller>();
                Vector3             myDir = new Vector3(start.x, start.y, 0) * .4f;
                myDir = Quaternion.Euler(0, 0, i * (360 / count)) * myDir;
                Magic clone = (Magic)Instantiate(owningChar.GetComponent <Character>().fireballSpawn.bullet, gameObject.transform.position + myDir, gameObject.transform.rotation);
                clone.gameObject.renderer.material = gameObject.renderer.material;
                clone.owningChar = owningChar;

                clone.rigidbody.velocity = new Vector2(myDir.x, myDir.y).normalized;
                //clone.rigidbody.useGravity = true;
                clone.characterNumber = con.getCharacter();
            }
        }

        Character guy = collision.collider.gameObject.GetComponent <Character>();

        if (guy != null)
        {
            if (!guy.getInvincible() && !guy.diedLastFrame)
            {
                guy.diedLastFrame = true;
                if (characterNumber == guy.getId())
                {
                    //guy.alterNumKills(-1);
                }
                else if (owningChar.transform.root.GetComponent <CharacterProjectile>().getTeamNum() != guy.teamNum)
                {
                    Destroy(this.gameObject);
                    if (GameManager.gameType == 1 || GameManager.gameType == 2)
                    {
                        GameManager.getPlayer(characterNumber).alterNumKills(1);
                    }
                    else if (GameManager.gameType == 3)
                    {
                        if (guy.isJuggernaut)
                        {
                            GameManager.getPlayer(characterNumber).isJuggernaut = true;
                            guy.isJuggernaut = false;
                        }
                    }
                    GameManager.randomizeSpawn(guy);
                    guy.Kill();
                }
            }
            if (guy.getInvincible())
            {
                Destroy(this.gameObject);
            }
        }

        if (collision.collider.gameObject.name != "Magic")
        {
            if (numberOfBounces > 0 && currentTime > 0.01)
            {
                GameObject   getSound = GameObject.Find("SoundManager");
                SoundManager SM       = getSound.GetComponent <SoundManager>();
                SM.playRicochetteBounce();

                numberOfBounces--;
                //BOUNCE....
                //Manually... Something to do with dot.
            }
            else if (numberOfBounces > 0 && currentTime < 0.01)
            {
                GameObject   getSound = GameObject.Find("SoundManager");
                SoundManager SM       = getSound.GetComponent <SoundManager>();
                SM.playRicochetteBounce();

                transform.position = new Vector3(transform.position.x, transform.position.y + 0.4f, transform.position.z);
            }
            else if ((numberOfBounces == 0 && this.gameObject.name != "WallBullet(Clone)") || (this.gameObject.name == "WallBullet(Clone)" && !collision.collider.gameObject.GetComponent <Magic>()))
            {
                Destroy(this.gameObject);
            }
        }
    }
예제 #45
0
 /// <summary>
 /// 蓄能电击 : 攻击次数为该回合使用过的技能数 + 1
 /// </summary>
 /// <param name="m"></param>
 void accumulator(ref Magic m)
 {
     m.skill.count = 1 + magicCore.getTurnSkillUsedCount();
 }
예제 #46
0
 /// <summary>
 /// 火焰缠绕:附加一回合的反伤buff,如果怪物死亡,回复节点魔力
 /// </summary>
 /// <param name="magic"></param>
 void sS5(ref Magic magic)
 {
     //添加防御路径
     magicCore.addBuff(buffTool.getBuff(BuffName.火焰路径), -1);
 }
예제 #47
0
파일: Writer.cs 프로젝트: Norbyte/lslib
        private Magic InitMagic()
        {
            var magic = new Magic();
            magic.format = Magic.Format.LittleEndian32;
            magic.signature = Magic.SignatureFromFormat(magic.format);

            magic.headersSize = 0; // Updated after headers are serialized
            magic.headerFormat = 0;
            magic.reserved1 = 0;
            magic.reserved2 = 0;

            magic.SetFormat(Format, AlternateMagic);
            return magic;
        }
예제 #48
0
 /// <summary>
 /// 超频:下回合开始时攻击力减1
 /// </summary>
 /// <param name="magic"></param>
 void sS7(ref Magic magic)//超频:添加buff:下回合开始时攻击力-1
 {
     magicCore.addBuff(buffTool.getBuff(BuffName.ATK下降), -1);
 }
예제 #49
0
 public Enemy(PlayerStats stats, Armor armor, Weapon weapon, Magic magic)
     : base(stats, armor, weapon)
 {
     this.Magic = magic;
 }
예제 #50
0
 /// <summary>
 /// 燃烧潜能:回合开始时,hp-3.atk+3
 /// </summary>
 /// <param name="magic"></param>
 void sS8(ref Magic magic)
 {
     magicCore.addBuff(buffTool.getBuff(BuffName.燃烧潜能), -1);
 }
예제 #51
0
 public Magic PeekMagic()
 {
     if (_peek == Magic.Invalid)
         _peek = (Magic)_br.ReadByte();
     return _peek;
 }
예제 #52
0
    /// <summary>
    /// 毒爆术前 : 伤害为5*毒buff的层数
    /// </summary>
    /// <param name="magic"></param>
    void bePoisonBomb(ref Magic magic)
    {
        int d = magicCore.checkMonsterBuff(magic.target, Monster.BuffConnection.Poison);

        magic.skill.addbasic = d * 5;
    }
예제 #53
0
 /// <summary>
 /// 御风术: ATK增加当前节点魔力值 + 2
 /// </summary>
 /// <param name="m"></param>
 void windMaster(ref Magic m)
 {
     magicCore.setATK(magicCore.getATK() + magicCore.getPoint(magicCore.getRoute()[m.magicRoute[1]].pEnd).magic + 2);
 }
예제 #54
0
 public virtual void OnTabControlCreated(Magic.Controls.TabControl tabControl)
 {
     // Notify interested parties about creation of a new TabControl instance
     if (TabControlCreated != null)
         TabControlCreated(tabControl);
 }
		internal void AddMagic(int offset, string type, string magic)
		{
			// Some preliminary checks...
			if (string.IsNullOrEmpty(magic))
			{
				return;
			}
			var m = new Magic(offset, type, magic);
			_magics.Add(m);
			_minLength = Math.Max(_minLength, m.Size());
		}
예제 #56
0
        static void LoadLibraries()
        {
            Count = MapLibs.Length + Monsters.Length + NPCs.Length + CArmours.Length +
                    CHair.Length + CWeapons.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length +
                    ARArmours.Length + ARHair.Length + ARWeapons.Length + ARWeaponsS.Length +
                    CHumEffect.Length + AHumEffect.Length + ARHumEffect.Length + Mounts.Length + Fishing.Length + Pets.Length + 20;

            Dragon.Initialize();
            Progress++;

            ChrSel.Initialize();
            Progress++;

            Prguse.Initialize();
            Progress++;

            Prguse2.Initialize();
            Progress++;

            BuffIcon.Initialize();
            Progress++;

            Help.Initialize();
            Progress++;

            MiniMap.Initialize();
            Progress++;
            MagIcon.Initialize();
            Progress++;
            MagIcon2.Initialize();
            Progress++;

            Magic.Initialize();
            Progress++;
            Magic2.Initialize();
            Progress++;
            Magic3.Initialize();
            Progress++;
            MagicC.Initialize();
            Progress++;
            Effect.Initialize();
            Progress++;
            CustomEffects.Initialize();
            Progress++;

            Items.Initialize();
            Progress++;
            StateItems.Initialize();
            Progress++;
            FloorItems.Initialize();
            Progress++;

            for (int i = 0; i < MapLibs.Length; i++)
            {
                if (MapLibs[i] == null)
                {
                    MapLibs[i] = new MLibrary("");
                }
                else
                {
                    MapLibs[i].Initialize();
                }
                Progress++;
            }

            for (int i = 0; i < Monsters.Length; i++)
            {
                Monsters[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < NPCs.Length; i++)
            {
                NPCs[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < CArmours.Length; i++)
            {
                CArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CHair.Length; i++)
            {
                CHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CWeapons.Length; i++)
            {
                CWeapons[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < AArmours.Length; i++)
            {
                AArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AHair.Length; i++)
            {
                AHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AWeaponsL.Length; i++)
            {
                AWeaponsL[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AWeaponsR.Length; i++)
            {
                AWeaponsR[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARArmours.Length; i++)
            {
                ARArmours[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARHair.Length; i++)
            {
                ARHair[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARWeapons.Length; i++)
            {
                ARWeapons[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARWeaponsS.Length; i++)
            {
                ARWeaponsS[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < CHumEffect.Length; i++)
            {
                CHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < AHumEffect.Length; i++)
            {
                AHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < ARHumEffect.Length; i++)
            {
                ARHumEffect[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Mounts.Length; i++)
            {
                Mounts[i].Initialize();
                Progress++;
            }


            for (int i = 0; i < Fishing.Length; i++)
            {
                Fishing[i].Initialize();
                Progress++;
            }

            for (int i = 0; i < Pets.Length; i++)
            {
                Pets[i].Initialize();
                Progress++;
            }

            Loaded = true;
        }
예제 #57
0
 /// <summary>
 /// 毒弹:给敌人添加5层毒buff
 /// </summary>
 /// <param name="magic"></param>
 void PoisonBall(ref Magic magic)
 {
     magicCore.addMonsterBuff(magic.target, Monster.BuffConnection.Poison, 5);
 }
예제 #58
0
 /// <summary>
 /// 节点修复 : 修复节点,恢复最大魔力
 /// </summary>
 /// <param name="m"></param>
 void fixPoint(ref Magic m)
 {
     magicCore.setFlag(ClickFlag.fixPoint);
 }
예제 #59
0
 public void ApplyMagic(Magic magic)
 {
     MinDamage += (magic.Strength * 2) + (magic.Agility);
     MaxDamage += (magic.Strength * 3) + (magic.Agility * 4);
 }
예제 #60
0
 /// <summary>
 /// 黑暗剑 : 每次提高微小的伤害
 /// </summary>
 /// <param name="m"></param>
 void DarkSword(ref Magic m)
 {
     m.skill.power += 0.1f;
 }