System.Collections.ArrayList.Add(object)

Here are the examples of the csharp api System.Collections.ArrayList.Add(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2254 Examples 7

19 View Source File : Session.cs
License : GNU General Public License v2.0
Project Creator : afrantzis

public void Load(string path)
	{
        using (XmlReader xmlReader = XmlReader.Create(path)) {
            XmlDoreplacedent xmlDoc = new XmlDoreplacedent();
            xmlDoc.Load(xmlReader);

            XmlNodeList fileList = xmlDoc.GetElementsByTagName("file");

            foreach(XmlNode fileNode in fileList) {
                XmlNodeList childNodes = fileNode.ChildNodes;
                SessionFileInfo sfi = new SessionFileInfo();
                foreach(XmlNode node in childNodes) {
                    switch (node.Name) {
                        case "path":
                            sfi.Path = node.InnerText;
                            break;
                        case "offset":
                            sfi.Offset = Convert.ToInt64(node.InnerText);
                            break;
                        case "cursoroffset":
                            sfi.CursorOffset = Convert.ToInt64(node.InnerText);
                            break;
                        case "cursordigit":
                            sfi.CursorDigit = Convert.ToInt32(node.InnerText);
                            break;
                        case "layout":
                            sfi.Layout = node.InnerText;
                            break;
                        case "focusedarea":
                            sfi.FocusedArea = Convert.ToInt32(node.InnerText);
                            break;
                        default:
                            break;
                    }
                }
                files.Add(sfi);
            }

            XmlNodeList heightList = xmlDoc.GetElementsByTagName("windowheight");
            foreach(XmlNode heightNode in heightList) {
                windowHeight = Convert.ToInt32(heightNode.InnerText);
            }

            XmlNodeList widthList = xmlDoc.GetElementsByTagName("windowwidth");
            foreach(XmlNode widthNode in widthList) {
                windowWidth = Convert.ToInt32(widthNode.InnerText);
            }

            XmlNodeList activeList = xmlDoc.GetElementsByTagName("activefile");
            foreach(XmlNode activeNode in activeList) {
                activeFile = activeNode.InnerText;
            }
		}
	}

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeElementsClosingOnNewElementStart()
        {
            _htmlElementsClosingColgroup = new ArrayList();
            _htmlElementsClosingColgroup.Add("colgroup");
            _htmlElementsClosingColgroup.Add("tr");
            _htmlElementsClosingColgroup.Add("thead");
            _htmlElementsClosingColgroup.Add("tfoot");
            _htmlElementsClosingColgroup.Add("tbody");

            _htmlElementsClosingDD = new ArrayList();
            _htmlElementsClosingDD.Add("dd");
            _htmlElementsClosingDD.Add("dt");
            // TODO: dd may end in other cases as well - if a new "p" starts, etc.
            // TODO: these are the basic "legal" cases but there may be more recovery

            _htmlElementsClosingDT = new ArrayList();
            _htmlElementsClosingDD.Add("dd");
            _htmlElementsClosingDD.Add("dt");
            // TODO: dd may end in other cases as well - if a new "p" starts, etc.
            // TODO: these are the basic "legal" cases but there may be more recovery

            _htmlElementsClosingLI = new ArrayList();
            _htmlElementsClosingLI.Add("li");
            // TODO: more complex recovery

            _htmlElementsClosingTbody = new ArrayList();
            _htmlElementsClosingTbody.Add("tbody");
            _htmlElementsClosingTbody.Add("thead");
            _htmlElementsClosingTbody.Add("tfoot");
            // TODO: more complex recovery

            _htmlElementsClosingTR = new ArrayList();
            // NOTE: tr should not really close on a new thead
            // because if there are rows before a thead, it is replacedumed to be in tbody, whose start tag is optional
            // and thead can't come after tbody
            // however, if we do encounter this, it's probably best to end the row and ignore the thead or treat
            // it as part of the table
            _htmlElementsClosingTR.Add("thead");
            _htmlElementsClosingTR.Add("tfoot");
            _htmlElementsClosingTR.Add("tbody");
            _htmlElementsClosingTR.Add("tr");
            // TODO: more complex recovery

            _htmlElementsClosingTD = new ArrayList();
            _htmlElementsClosingTD.Add("td");
            _htmlElementsClosingTD.Add("th");
            _htmlElementsClosingTD.Add("tr");
            _htmlElementsClosingTD.Add("tbody");
            _htmlElementsClosingTD.Add("tfoot");
            _htmlElementsClosingTD.Add("thead");
            // TODO: more complex recovery

            _htmlElementsClosingTH = new ArrayList();
            _htmlElementsClosingTH.Add("td");
            _htmlElementsClosingTH.Add("th");
            _htmlElementsClosingTH.Add("tr");
            _htmlElementsClosingTH.Add("tbody");
            _htmlElementsClosingTH.Add("tfoot");
            _htmlElementsClosingTH.Add("thead");
            // TODO: more complex recovery

            _htmlElementsClosingThead = new ArrayList();
            _htmlElementsClosingThead.Add("tbody");
            _htmlElementsClosingThead.Add("tfoot");
            // TODO: more complex recovery

            _htmlElementsClosingTfoot = new ArrayList();
            _htmlElementsClosingTfoot.Add("tbody");
            // although thead comes before tfoot, we add it because if it is found the tfoot should close
            // and some recovery processing be done on the thead
            _htmlElementsClosingTfoot.Add("thead");
            // TODO: more complex recovery
        }

19 View Source File : AHSSShotGunCollider.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        if (!isLocal)
        {
            return;
        }

        if (this.active_me)
        {
            switch (other.gameObject.tag)
            {
                case "playerHitbox":
                    if (!FengGameManagerMKII.Level.PVPEnabled)
                    {
                        return;
                    }
                    float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                    num = Mathf.Min(1f, num);
                    HitBox component = other.gameObject.GetComponent<HitBox>();
                    if (component != null && component.transform.root != null)
                    {
                        if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                        {
                            return;
                        }
                        if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                                {
                                    component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                                }
                            }
                            else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().MarkDie();
                                component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                                {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                this.viewID,
                                this.ownerName,
                                false
                                });
                            }
                        }
                    }
                    break;

                case "replacedanneck":
                    HitBox component2 = other.gameObject.GetComponent<HitBox>();
                    if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                    {
                        component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                        this.currentHits.Add(component2);
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num2 = Mathf.Max(10, num2);
                                FengGameManagerMKII.FGM.netShowDamage(num2);
                                if ((float)num2 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    component2.transform.root.GetComponent<replacedAN>().Die();
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                                    }
                                    FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                                }
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.GetComponent<PhotonView>().BasePV.IsMine)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>())
                            {
                                if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                                {
                                    int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                    num3 = Mathf.Max(10, num3);
                                    if ((float)num3 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                    {
                                        if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                        {
                                            IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                            component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                        }
                                        component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                        {
                                        baseT.root.gameObject.GetPhotonView().viewID,
                                        num3
                                        });
                                    }
                                }
                            }
                            else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                            {
                                int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num4 = Mathf.Max(10, num4);
                                if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                    });
                                }
                            }
                            else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num5
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num6 = Mathf.Max(10, num6);
                                if ((float)num6 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                                    }
                                    component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                                }
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num7 = Mathf.Max(10, num7);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                                }
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;

                case "erenHitbox":
                    if (this.dmg > 0 && !other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().ireplaced)
                    {
                        other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().hitByreplacedan();
                    }
                    break;

                case "replacedaneye":
                    if (!this.currentHits.Contains(other.gameObject))
                    {
                        this.currentHits.Add(other.gameObject);
                        GameObject gameObject = other.gameObject.transform.root.gameObject;
                        if (gameObject.GetComponent<FEMALE_replacedAN>())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().hitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                        }
                        else if (gameObject.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().HitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    break;

                case "replacedanankle":
                    if (currentHits.Contains(other.gameObject))
                    {
                        return;
                    }

                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject2.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                    num9 = Mathf.Max(10, num9);
                    if (gameObject2.GetComponent<replacedAN>() && gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                        }
                        else
                        {
                            if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                            {
                                if (!gameObject2.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    else if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (other.gameObject.name == "ankleR")
                            {
                                if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                                }
                            }
                            else if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                            }
                        }
                        else if (other.gameObject.name == "ankleR")
                        {
                            if (!PhotonNetwork.IsMasterClient)
                            {
                                if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;
            }
        }
    }

19 View Source File : XffectCache.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void Awake()
    {
        foreach (object obj in base.transform)
        {
            Transform transform = (Transform)obj;
            this.ObjectDic[transform.name] = new ArrayList();
            this.ObjectDic[transform.name].Add(transform);
            Xffect component = transform.GetComponent<Xffect>();
            if (component != null)
            {
                component.Initialize();
            }
            transform.gameObject.SetActive(false);
        }
    }

19 View Source File : AHSSShotGunCollider.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        if (!isLocal)
            return;
        if (this.active_me)
        {
            switch (other.gameObject.tag)
            {
                case "playerHitbox":
                    if (!FengGameManagerMKII.Level.PVPEnabled)
                    {
                        return;
                    }
                    float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                    num = Mathf.Min(1f, num);
                    HitBox component = other.gameObject.GetComponent<HitBox>();
                    if (component != null && component.transform.root != null)
                    {
                        if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                        {
                            return;
                        }
                        if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                                {
                                    component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                                }
                            }
                            else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().MarkDie();
                                component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                                {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                this.viewID,
                                this.ownerName,
                                false
                                });
                            }
                        }
                    }
                    break;

                case "replacedanneck":
                    HitBox component2 = other.gameObject.GetComponent<HitBox>();
                    if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                    {
                        component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                        this.currentHits.Add(component2);
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num2 = Mathf.Max(10, num2);
                                FengGameManagerMKII.FGM.netShowDamage(num2);
                                if ((float)num2 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    component2.transform.root.GetComponent<replacedAN>().Die();
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                                    }
                                    FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                                }
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.GetComponent<PhotonView>().BasePV.IsMine)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>())
                            {
                                if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                                {
                                    int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                    num3 = Mathf.Max(10, num3);
                                    if ((float)num3 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                    {
                                        if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                        {
                                            IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                            component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                        }
                                        component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                        {
                                        baseT.root.gameObject.GetPhotonView().viewID,
                                        num3
                                        });
                                    }
                                }
                            }
                            else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                            {
                                int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num4 = Mathf.Max(10, num4);
                                if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                    });
                                }
                            }
                            else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num5
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num6 = Mathf.Max(10, num6);
                                if ((float)num6 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                                    }
                                    component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                                }
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num7 = Mathf.Max(10, num7);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                                }
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;

                case "erenHitbox":
                    if (this.dmg > 0 && !other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().ireplaced)
                    {
                        other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().hitByreplacedan();
                    }
                    break;

                case "replacedaneye":
                    if (!this.currentHits.Contains(other.gameObject))
                    {
                        this.currentHits.Add(other.gameObject);
                        GameObject gameObject = other.gameObject.transform.root.gameObject;
                        if (gameObject.GetComponent<FEMALE_replacedAN>())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().hitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                        }
                        else if (gameObject.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().HitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    break;

                case "replacedanankle":
                    if (currentHits.Contains(other.gameObject)) return;
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject2.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                    num9 = Mathf.Max(10, num9);
                    if (gameObject2.GetComponent<replacedAN>() && gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                        }
                        else
                        {
                            if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                            {
                                if (!gameObject2.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    else if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (other.gameObject.name == "ankleR")
                            {
                                if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                                }
                            }
                            else if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                            }
                        }
                        else if (other.gameObject.name == "ankleR")
                        {
                            if (!PhotonNetwork.IsMasterClient)
                            {
                                if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;
            }
        }
    }

19 View Source File : OVRLipSyncDebugConsole.cs
License : MIT License
Project Creator : absurd-joy

public void AddMessage(string message, Color color)
    {
        messages.Add(message);

        if(textMsg != null)
            textMsg.color = color;

        Display();
    }

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeInlineElements()
        {
            _htmlInlineElements = new ArrayList();
            _htmlInlineElements.Add("a");
            _htmlInlineElements.Add("abbr");
            _htmlInlineElements.Add("acronym");
            _htmlInlineElements.Add("address");
            _htmlInlineElements.Add("b");
            _htmlInlineElements.Add("bdo"); // ???
            _htmlInlineElements.Add("big");
            _htmlInlineElements.Add("button");
            _htmlInlineElements.Add("code");
            _htmlInlineElements.Add("del"); // deleted text
            _htmlInlineElements.Add("dfn");
            _htmlInlineElements.Add("em");
            _htmlInlineElements.Add("font");
            _htmlInlineElements.Add("i");
            _htmlInlineElements.Add("ins"); // inserted text
            _htmlInlineElements.Add("kbd"); // text to entered by a user
            _htmlInlineElements.Add("label");
            _htmlInlineElements.Add("legend"); // ???
            _htmlInlineElements.Add("q"); // short inline quotation
            _htmlInlineElements.Add("s"); // strike-through text style
            _htmlInlineElements.Add("samp"); // Specifies a code sample
            _htmlInlineElements.Add("small");
            _htmlInlineElements.Add("span");
            _htmlInlineElements.Add("strike");
            _htmlInlineElements.Add("strong");
            _htmlInlineElements.Add("sub");
            _htmlInlineElements.Add("sup");
            _htmlInlineElements.Add("u");
            _htmlInlineElements.Add("var"); // indicates an instance of a program variable
        }

19 View Source File : FrmDoublePageReader.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public void StartUp(Manga m, FrmStartPage startPage)
        {
            this.root = m.mangaDirectory;
            this.startPage = startPage;
            
            foreach (DirectoryInfo dir in root.GetDirectories("*", SearchOption.TopDirectoryOnly)) // chapters
            {
                FileInfo[] files = dir.GetFiles("*");
                ArrayList pages = new ArrayList();

                foreach (FileInfo fi in files) // pages
                {
                    string shortName = Path.GetFileNameWithoutExtension(fi.Name);
                    string num = Regex.Match(shortName, @"(\d+(\.\d+)?)|(\.\d+)").Value;
                    pages.Add(new Page(num, fi));
                }

                Chapter c = new Chapter(dir.Name, dir, SortPages((Page[])pages.ToArray(typeof(Page))));
                if (dir.Name == m.currentChapter)
                {
                    curChapter = c;
                } 
                chapters.Add(c);
            }

            UpdateChapters();
            UpdatePages(curChapter);
            cmboPage.SelectedItem = m.currentPage;
        }

19 View Source File : ProgramArguments.cs
License : MIT License
Project Creator : Alan-FGR

public bool SetValue(string value, object destination)
			{
				if (SeenValue && !AllowMultiple)
				{
					this.reporter(string.Format("Duplicate '{0}' argument", this.LongName));
					return false;
				}
				this.seenValue = true;

				object newValue;
				if (!ParseValue(this.ValueType, value, out newValue))
					return false;
				if (this.IsCollection)
				{
					if (this.Unique && this.collectionValues.Contains(newValue))
					{
						ReportDuplicateArgumentValue(value);
						return false;
					}
					else
					{
						this.collectionValues.Add(newValue);
					}
				}
				else
				{
					this.field.SetValue(destination, newValue);
				}

				return true;
			}

19 View Source File : KissMangaDownload.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public void DownloadAsync(Uri imgUrl, string imgFile)
        {
            using (WebClient wc = new WebClient())
            {
                total++;
                clients.Add(wc);
                wc.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompletedCallback);
                wc.DownloadFileAsync(imgUrl, imgFile);
            }
        }

19 View Source File : PanelMultiJoin.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void updateFilterRooms()
    {
        this.filterRoom = new ArrayList();
        if (this.filter == string.Empty)
        {
            return;
        }
        foreach (RoomInfo roomInfo in PhotonNetwork.GetRoomList())
        {
            if (roomInfo.Name.ToUpper().Contains(this.filter.ToUpper()))
            {
                this.filterRoom.Add(roomInfo);
            }
        }
    }

19 View Source File : TriggerColliderWeapon.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        //if (this.ActiveMe)
        //{
        if (!this.currentHitsII.Contains(other.gameObject))
        {
            this.currentHitsII.Add(other.gameObject);
            IN_GAME_MAIN_CAMERA.MainCamera.startShake(0.1f, 0.1f, 0.95f);
            if (other.gameObject.transform.root.gameObject.CompareTag("replacedan"))
            {
                IN_GAME_MAIN_CAMERA.MainHERO.slashHit.Play();
                if (IN_GAME_MAIN_CAMERA.GameType != GameType.Single)
                {
                    Optimization.Caching.Pool.NetworkEnable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f), 0);
                }
                else
                {
                    Pool.Enable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f));//(GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("hitMeat"));
                }
                //gameObject.transform.position = baseT.position;
                baseT.root.GetComponent<HERO>().useBlade(0);
            }
        }
        switch (other.gameObject.tag)
        {
            case "playerHitbox":
                if (!FengGameManagerMKII.Level.PVPEnabled)
                {
                    return;
                }
                float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                num = Mathf.Min(1f, num);
                HitBox component = other.gameObject.GetComponent<HitBox>();
                if (component != null && component.transform.root != null)
                {
                    if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                    {
                        return;
                    }
                    if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                            }
                        }
                        else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                        {
                            component.transform.root.GetComponent<HERO>().MarkDie();
                            component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                            {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                baseT.root.gameObject.GetPhotonView().viewID,
                                PhotonView.Find(baseT.root.gameObject.GetPhotonView().viewID).owner.Properties[PhotonPlayerProperty.name],
                                false
                            });
                        }
                    }
                }
                break;

            case "replacedanneck":
                HitBox component2 = other.gameObject.GetComponent<HitBox>();
                if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                {
                    component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                    this.currentHits.Add(component2);
                    this.meatDie.Play();
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num2 = Mathf.Max(10, num2);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().Die();
                            this.napeMeat(IN_GAME_MAIN_CAMERA.MainR.velocity, component2.transform.root);
                            FengGameManagerMKII.FGM.netShowDamage(num2);
                            FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.gameObject.GetPhotonView().IsMine)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num3 = Mathf.Max(10, num3);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                    component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                }
                                component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num3
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num4 = Mathf.Max(10, num4);
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num5
                                });
                            }
                        }
                    }
                    else if (component2.transform.root.GetComponent<replacedAN>())
                    {
                        if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num6 = Mathf.Max(10, num6);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                        }
                    }
                    else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num7 = Mathf.Max(10, num7);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                        }
                    }
                    else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                    }
                    this.showCriticalHitFX();
                }
                break;

            case "replacedaneye":
                if (!this.currentHits.Contains(other.gameObject))
                {
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                    }
                    else if (gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                        this.showCriticalHitFX();
                    }
                }
                break;

            case "replacedanankle":
                if (currentHits.Contains(other.gameObject)) return;
                this.currentHits.Add(other.gameObject);
                GameObject gameObject3 = other.gameObject.transform.root.gameObject;
                int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject3.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                num9 = Mathf.Max(10, num9);
                if (gameObject3.GetComponent<replacedAN>() && gameObject3.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                    }
                    else
                    {
                        if (!PhotonNetwork.IsMasterClient || !gameObject3.GetPhotonView().IsMine)
                        {
                            if (!gameObject3.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                        this.showCriticalHitFX();
                    }
                }
                else if (gameObject3.GetComponent<FEMALE_replacedAN>())
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (other.gameObject.name == "ankleR")
                        {
                            if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                            }
                        }
                        else if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                        }
                    }
                    else if (other.gameObject.name == "ankleR")
                    {
                        if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient)
                    {
                        if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                            {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                            });
                        }
                    }
                    else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                    {
                        gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                    }
                    this.showCriticalHitFX();
                }
                break;
        }
        //}
    }

19 View Source File : AbstractBehaviour.cs
License : GNU General Public License v3.0
Project Creator : a2659802

public object Setup(Operation op, object val)
        {
            item?.Setup(op, val);

            var handlers = ReflectionCache.GetMethods(GetType(), op);
            if (handlers == null)
                return null;

            object _return = null;
            foreach (var m in handlers)
            {
                object[] args;
                if (val == null)
                {
                    ArrayList objList = new ArrayList();
                    for (int i = 0; i < m.GetParameters().Length; i++)
                        objList.Add(null);
                    args = objList.ToArray();
                    Logger.LogDebug($"argument null,fill with {args.Length} null");
                } 
                else
                    args = new object[] { val.GetType() == typeof(V2) ? ((Vector2)((V2)val)) : val, };
                object mechod_ret = m.Invoke(this, args);
                _return = mechod_ret == null ? _return: mechod_ret;
            }
            return _return;
        }

19 View Source File : Session.cs
License : GNU General Public License v2.0
Project Creator : afrantzis

public void AddFile(string name, long offset, long cursorOffset, int cursorDigit, string layout, int focusedArea)
	{
		string path = Path.GetFullPath(name);
		SessionFileInfo sfi = new SessionFileInfo(path, offset, cursorOffset, cursorDigit, layout, focusedArea);
		files.Add(sfi);
	}

19 View Source File : DownloadManager.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public void AddNHToQueue(Manga m, string chapterID)
        {
            string dlUrl = "https://nhentai.net/g/" + chapterID + "/1";
            Download dl = CreateNHDownload(chapterID, m, dlUrl);
            Logger.Log("Adding NH to queue '" + m.name + " chapter " + dl.chapterNumber + "'");
            downloadQueue.Push(dl);
            downloads.Add(dl);
            downloadCount++;

            DownloadNextFromQueue();
        }

19 View Source File : ArrayList.cs
License : Mozilla Public License 2.0
Project Creator : ahyahy

public object Add(object value)
        {
            M_ArrayList.Add(value);
            System.Windows.Forms.Application.DoEvents();
            return value;
        }

19 View Source File : GameController.cs
License : Apache License 2.0
Project Creator : AdColony

void Start()
    {
        GameObject configureObj = GameObject.FindGameObjectWithTag(Constants.AsteroidConfigureTag);
        asteroidConfigure = configureObj.GetComponent<Asteroid>();

        GameObject requestObj = GameObject.FindGameObjectWithTag(Constants.AsteroidRequestTag);
        asteroidRequest = requestObj.GetComponent<Asteroid>();

        GameObject playObj = GameObject.FindGameObjectWithTag(Constants.AsteroidPlayTag);
        asteroidPlay = playObj.GetComponent<Asteroid>();

        GameObject adViewRequstObj = GameObject.FindGameObjectWithTag(Constants.AsteroidAdViewRequest);
        asteroidAdViewRequest = adViewRequstObj.GetComponent<Asteroid>();
        GameObject adViewDestroyObj = GameObject.FindGameObjectWithTag(Constants.AsteroidAdViewDestroy);
        asteroidAdViewDestroy = adViewDestroyObj.GetComponent<Asteroid>();

        // Only configure asteroid is available at start.
        asteroidConfigure.Show();
        asteroidRequest.Hide();
        asteroidPlay.Hide();
        asteroidAdViewRequest.Hide();
        asteroidAdViewDestroy.Hide();

        // ----- AdColony Ads -----

        AdColony.Ads.OnConfigurationCompleted += (List<AdColony.Zone> zones_) =>
        {
            Debug.Log("AdColony.Ads.OnConfigurationCompleted called");

            if (zones_ == null || zones_.Count <= 0)
            {
                // Show the configure asteroid again.
                asteroidConfigure.Show();
            }
            else
            {
                // Successfully configured... show the request ad asteroid.
                asteroidRequest.Show();
                asteroidAdViewRequest.Show();
            }
        };

        AdColony.Ads.OnRequestIntersreplacedial += (AdColony.IntersreplacedialAd ad_) =>
        {
            Debug.Log("AdColony.Ads.OnRequestIntersreplacedial called");
            Ad = ad_;

            // Successfully requested ad... show the play ad asteroid.
            asteroidPlay.Show();
        };

        AdColony.Ads.OnRequestIntersreplacedialFailedWithZone += (string zoneId) =>
        {
            Debug.Log("AdColony.Ads.OnRequestIntersreplacedialFailedWithZone called, zone: " + zoneId);

            // Request Ad failed... show the request ad asteroid.
            asteroidRequest.Show();
        };

        AdColony.Ads.OnOpened += (AdColony.IntersreplacedialAd ad_) =>
        {
            Debug.Log("AdColony.Ads.OnOpened called");

            // Ad started playing... show the request ad asteroid for the next ad.
            asteroidRequest.Show();
        };

        AdColony.Ads.OnClosed += (AdColony.IntersreplacedialAd ad_) =>
        {
            Debug.Log("AdColony.Ads.OnClosed called, expired: " + ad_.Expired);
            ad_.DestroyAd();
        };

        AdColony.Ads.OnExpiring += (AdColony.IntersreplacedialAd ad_) =>
        {
            Debug.Log("AdColony.Ads.OnExpiring called");
            Ad = null;

            // Current ad expired... show the request ad asteroid.
            asteroidRequest.Show();
            asteroidPlay.Hide();
        };

        AdColony.Ads.OnIAPOpportunity += (AdColony.IntersreplacedialAd ad_, string iapProductId_, AdColony.AdsIAPEngagementType engagement_) =>
        {
            Debug.Log("AdColony.Ads.OnIAPOpportunity called");
        };

        AdColony.Ads.OnRewardGranted += (string zoneId, bool success, string name, int amount) =>
        {
            Debug.Log(string.Format("AdColony.Ads.OnRewardGranted called\n\tzoneId: {0}\n\tsuccess: {1}\n\tname: {2}\n\tamount: {3}", zoneId, success, name, amount));
        };

        AdColony.Ads.OnCustomMessageReceived += (string type, string message) =>
        {
            Debug.Log(string.Format("AdColony.Ads.OnCustomMessageReceived called\n\ttype: {0}\n\tmessage: {1}", type, message));
        };

        //Banner events.
        AdColony.Ads.OnAdViewOpened += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewOpened called");

        };
        AdColony.Ads.OnAdViewLoaded += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewLoaded called");
            asteroidAdViewDestroy.Show();
            arrayList.Add(ad_);
            adView = ad_;

            // Show or hide the ad view(this is optional; the banner is shown by default)
            /* Setting 2 timers of 5 and 10 seconds, after 5 sec calling 
             * the ad view's hide method that is defined below and after 10 sec calling the ad view's show method that is defined below.*/
            Invoke("HideAdView", 5.0f);
            Invoke("ShowAdView", 10.0f);
        };

        AdColony.Ads.OnAdViewFailedToLoad += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewFailedToLoad called with Zone id:" + ad_.ZoneId + " " + ad_.adPosition);
            asteroidAdViewRequest.Show();


        };
        AdColony.Ads.OnAdViewClosed += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewClosed called");

        };
        AdColony.Ads.OnAdViewClicked += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewClicked called");

        };
        AdColony.Ads.OnAdViewLeftApplication += (AdColony.AdColonyAdView ad_) =>
        {
            Debug.Log("AdColony.SampleApps.OnAdViewLeftApplication called");

        };
    }

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeEmptyElements()
        {
            // Build a list of empty (no-scope) elements 
            // (element not requiring closing tags, and not accepting any content)
            _htmlEmptyElements = new ArrayList();
            _htmlEmptyElements.Add("area");
            _htmlEmptyElements.Add("base");
            _htmlEmptyElements.Add("basefont");
            _htmlEmptyElements.Add("br");
            _htmlEmptyElements.Add("col");
            _htmlEmptyElements.Add("frame");
            _htmlEmptyElements.Add("hr");
            _htmlEmptyElements.Add("img");
            _htmlEmptyElements.Add("input");
            _htmlEmptyElements.Add("isindex");
            _htmlEmptyElements.Add("link");
            _htmlEmptyElements.Add("meta");
            _htmlEmptyElements.Add("param");
        }

19 View Source File : ConnectionPool.cs
License : Apache License 2.0
Project Creator : 0nise

public void closeConnection(MySqlConnection conn) {

            lock (pool)
            {
                if (conn != null)
                {
                    // 将次链接放入连接池中
                    pool.Add(conn);
                }
            }
        }

19 View Source File : ProgramArguments.cs
License : MIT License
Project Creator : Alan-FGR

private bool LexFileArguments(string fileName, out string[] arguments)
		{
			string args = null;

			try
			{
				using (FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read))
				{
					args = (new StreamReader(file)).ReadToEnd();
				}
			}
			catch (Exception e)
			{
				this.reporter(string.Format("Error: Can't open command line argument file '{0}' : '{1}'", fileName, e.Message));
				arguments = null;
				return false;
			}

			bool hadError = false;
			ArrayList argArray = new ArrayList();
			StringBuilder currentArg = new StringBuilder();
			bool inQuotes = false;
			int index = 0;

			// while (index < args.Length)
			try
			{
				while (true)
				{
					// skip whitespace
					while (char.IsWhiteSpace(args[index]))
					{
						index += 1;
					}

					// # - comment to end of line
					if (args[index] == '#')
					{
						index += 1;
						while (args[index] != '\n')
						{
							index += 1;
						}
						continue;
					}

					// do one argument
					do
					{
						if (args[index] == '\\')
						{
							int cSlashes = 1;
							index += 1;
							while (index == args.Length && args[index] == '\\')
							{
								cSlashes += 1;
							}

							if (index == args.Length || args[index] != '"')
							{
								currentArg.Append('\\', cSlashes);
							}
							else
							{
								currentArg.Append('\\', (cSlashes >> 1));
								if (0 != (cSlashes & 1))
								{
									currentArg.Append('"');
								}
								else
								{
									inQuotes = !inQuotes;
								}
							}
						}
						else if (args[index] == '"')
						{
							inQuotes = !inQuotes;
							index += 1;
						}
						else
						{
							currentArg.Append(args[index]);
							index += 1;
						}
					} while (!char.IsWhiteSpace(args[index]) || inQuotes);
					argArray.Add(currentArg.ToString());
					currentArg.Length = 0;
				}
			}
			catch (System.IndexOutOfRangeException)
			{
				// got EOF 
				if (inQuotes)
				{
					this.reporter(string.Format("Error: Unbalanced '\"' in command line argument file '{0}'", fileName));
					hadError = true;
				}
				else if (currentArg.Length > 0)
				{
					// valid argument can be terminated by EOF
					argArray.Add(currentArg.ToString());
				}
			}

			arguments = (string[])argArray.ToArray(typeof(string));
			return hadError;
		}

19 View Source File : TriggerColliderWeapon.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        //if (this.ActiveMe)
        //{
        if (!this.currentHitsII.Contains(other.gameObject))
        {
            this.currentHitsII.Add(other.gameObject);
            IN_GAME_MAIN_CAMERA.MainCamera.startShake(0.1f, 0.1f, 0.95f);
            if (other.gameObject.transform.root.gameObject.CompareTag("replacedan"))
            {
                IN_GAME_MAIN_CAMERA.MainHERO.slashHit.Play();
                if (IN_GAME_MAIN_CAMERA.GameType != GameType.Single)
                {
                    Optimization.Caching.Pool.NetworkEnable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f), 0);
                }
                else
                {
                    Pool.Enable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f));//(GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("hitMeat"));
                }
                //gameObject.transform.position = baseT.position;
                baseT.root.GetComponent<HERO>().useBlade(0);
            }
        }
        switch (other.gameObject.tag)
        {
            case "playerHitbox":
                if (!FengGameManagerMKII.Level.PVPEnabled)
                {
                    return;
                }
                float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                num = Mathf.Min(1f, num);
                HitBox component = other.gameObject.GetComponent<HitBox>();
                if (component != null && component.transform.root != null)
                {
                    if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                    {
                        return;
                    }
                    if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                            }
                        }
                        else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                        {
                            component.transform.root.GetComponent<HERO>().MarkDie();
                            component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                            {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                baseT.root.gameObject.GetPhotonView().viewID,
                                PhotonView.Find(baseT.root.gameObject.GetPhotonView().viewID).owner.Properties[PhotonPlayerProperty.name],
                                false
                            });
                        }
                    }
                }
                break;

            case "replacedanneck":
                HitBox component2 = other.gameObject.GetComponent<HitBox>();
                if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                {
                    component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                    this.currentHits.Add(component2);
                    this.meatDie.Play();
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num2 = Mathf.Max(10, num2);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().Die();
                            this.napeMeat(IN_GAME_MAIN_CAMERA.MainR.velocity, component2.transform.root);
                            FengGameManagerMKII.FGM.netShowDamage(num2);
                            FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.gameObject.GetPhotonView().IsMine)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num3 = Mathf.Max(10, num3);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                    component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                }
                                component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num3
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num4 = Mathf.Max(10, num4);
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num5
                                });
                            }
                        }
                    }
                    else if (component2.transform.root.GetComponent<replacedAN>())
                    {
                        if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num6 = Mathf.Max(10, num6);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                        }
                    }
                    else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num7 = Mathf.Max(10, num7);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                        }
                    }
                    else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                    }
                    this.showCriticalHitFX();
                }
                break;

            case "replacedaneye":
                if (!this.currentHits.Contains(other.gameObject))
                {
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                    }
                    else if (gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                        this.showCriticalHitFX();
                    }
                }
                break;

            case "replacedanankle":
                if (currentHits.Contains(other.gameObject))
                {
                    return;
                }

                this.currentHits.Add(other.gameObject);
                GameObject gameObject3 = other.gameObject.transform.root.gameObject;
                int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject3.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                num9 = Mathf.Max(10, num9);
                if (gameObject3.GetComponent<replacedAN>() && gameObject3.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                    }
                    else
                    {
                        if (!PhotonNetwork.IsMasterClient || !gameObject3.GetPhotonView().IsMine)
                        {
                            if (!gameObject3.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                        this.showCriticalHitFX();
                    }
                }
                else if (gameObject3.GetComponent<FEMALE_replacedAN>())
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (other.gameObject.name == "ankleR")
                        {
                            if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                            }
                        }
                        else if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                        }
                    }
                    else if (other.gameObject.name == "ankleR")
                    {
                        if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient)
                    {
                        if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                            {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                            });
                        }
                    }
                    else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                    {
                        gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                    }
                    this.showCriticalHitFX();
                }
                break;
        }
        //}
    }

19 View Source File : COLOSSAL_TITAN.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void callreplacedan(bool special = false)
    {
        if (!special && GameObject.FindGameObjectsWithTag("replacedan").Length > 6)
        {
            return;
        }
        GameObject[] array = GameObject.FindGameObjectsWithTag("replacedanRespawn");
        ArrayList arrayList = new ArrayList();
        foreach (GameObject gameObject in array)
        {
            if (gameObject.transform.parent.name == "replacedanRespawnCT")
            {
                arrayList.Add(gameObject);
            }
        }
        GameObject gameObject2 = (GameObject)arrayList[UnityEngine.Random.Range(0, arrayList.Count)];
        string[] array3 = new string[]
        {
            "replacedAN_VER3.1"
        };
        GameObject gameObject3;
        if (FengGameManagerMKII.LAN)
        {
            gameObject3 = (GameObject)Network.Instantiate(CacheResources.Load(array3[UnityEngine.Random.Range(0, array3.Length)]), gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        else
        {
            gameObject3 = Optimization.Caching.Pool.NetworkEnable(array3[UnityEngine.Random.Range(0, array3.Length)], gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        if (special)
        {
            GameObject[] array4 = GameObject.FindGameObjectsWithTag("route");
            GameObject gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            while (gameObject4.name != "routeCT")
            {
                gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            }
            gameObject3.GetComponent<replacedAN>().SetRoute(gameObject4);
            gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Aberrant, false);
            gameObject3.GetComponent<replacedAN>().activeRadPow = 0;
            gameObject3.GetComponent<replacedAN>().ToCheckPoint((Vector3)gameObject3.GetComponent<replacedAN>().checkPoints[0], 10f);
        }
        else
        {
            float num = 0.7f;
            float num2 = 0.7f;
            if (IN_GAME_MAIN_CAMERA.Difficulty != 0)
            {
                if (IN_GAME_MAIN_CAMERA.Difficulty == 1)
                {
                    num = 0.4f;
                    num2 = 0.7f;
                }
                else if (IN_GAME_MAIN_CAMERA.Difficulty == 2)
                {
                    num = -1f;
                    num2 = 0.7f;
                }
            }
            if (GameObject.FindGameObjectsWithTag("replacedan").Length == 5)
            {
                gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
            }
            else if (UnityEngine.Random.Range(0f, 1f) >= num)
            {
                if (UnityEngine.Random.Range(0f, 1f) < num2)
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
                }
                else
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Crawler, false);
                }
            }
            gameObject3.GetComponent<replacedAN>().activeRadPow = 40000;
        }
        if (FengGameManagerMKII.LAN)
        {
            GameObject gameObject5 = (GameObject)Network.Instantiate(CacheResources.Load("FX/FXreplacedanSpawn"), gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject5.transform.localScale = gameObject3.transform.localScale;
        }
        else
        {
            GameObject gameObject6 = Optimization.Caching.Pool.NetworkEnable("FX/FXreplacedanSpawn", gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject6.transform.localScale = gameObject3.transform.localScale;
        }
    }

19 View Source File : CommandLineParser.cs
License : MIT License
Project Creator : 91Act

public void ParseStrings(SwitchForm[] switchForms, string[] commandStrings)
		{
			int numCommandStrings = commandStrings.Length;
			bool stopSwitch = false;
			for (int i = 0; i < numCommandStrings; i++)
			{
				string s = commandStrings[i];
				if (stopSwitch)
					NonSwitchStrings.Add(s);
				else
					if (s == kStopSwitchParsing)
					stopSwitch = true;
				else
					if (!ParseString(s, switchForms))
					NonSwitchStrings.Add(s);
			}
		}

19 View Source File : AHSSShotGunCollider.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        if (!isLocal)
            return;
        if (this.active_me)
        {
            switch (other.gameObject.tag)
            {
                case "playerHitbox":
                    if (!FengGameManagerMKII.Level.PVPEnabled)
                    {
                        return;
                    }
                    float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                    num = Mathf.Min(1f, num);
                    HitBox component = other.gameObject.GetComponent<HitBox>();
                    if (component != null && component.transform.root != null)
                    {
                        if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                        {
                            return;
                        }
                        if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                                {
                                    component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                                }
                            }
                            else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().MarkDie();
                                component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                                {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                this.viewID,
                                this.ownerName,
                                false
                                });
                            }
                        }
                    }
                    break;

                case "replacedanneck":
                    HitBox component2 = other.gameObject.GetComponent<HitBox>();
                    if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                    {
                        component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                        this.currentHits.Add(component2);
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num2 = Mathf.Max(10, num2);
                                FengGameManagerMKII.FGM.netShowDamage(num2);
                                if ((float)num2 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    component2.transform.root.GetComponent<replacedAN>().Die();
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                                    }
                                    FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                                }
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.GetComponent<PhotonView>().BasePV.IsMine)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>())
                            {
                                if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                                {
                                    int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                    num3 = Mathf.Max(10, num3);
                                    if ((float)num3 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                    {
                                        if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                        {
                                            IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                            component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                        }
                                        component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                        {
                                        baseT.root.gameObject.GetPhotonView().viewID,
                                        num3
                                        });
                                    }
                                }
                            }
                            else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                            {
                                int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num4 = Mathf.Max(10, num4);
                                if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                    });
                                }
                            }
                            else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num5
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num6 = Mathf.Max(10, num6);
                                if ((float)num6 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                                    }
                                    component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                                }
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num7 = Mathf.Max(10, num7);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                                }
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;

                case "erenHitbox":
                    if (this.dmg > 0 && !other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().ireplaced)
                    {
                        other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().hitByreplacedan();
                    }
                    break;

                case "replacedaneye":
                    if (!this.currentHits.Contains(other.gameObject))
                    {
                        this.currentHits.Add(other.gameObject);
                        GameObject gameObject = other.gameObject.transform.root.gameObject;
                        if (gameObject.GetComponent<FEMALE_replacedAN>())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().hitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                        }
                        else if (gameObject.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().HitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    break;

                case "replacedanankle":
                    if (currentHits.Contains(other.gameObject)) return;
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject2.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                    num9 = Mathf.Max(10, num9);
                    if (gameObject2.GetComponent<replacedAN>() && gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                        }
                        else
                        {
                            if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                            {
                                if (!gameObject2.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    else if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (other.gameObject.name == "ankleR")
                            {
                                if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                                }
                            }
                            else if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                            }
                        }
                        else if (other.gameObject.name == "ankleR")
                        {
                            if (!PhotonNetwork.IsMasterClient)
                            {
                                if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;
            }
        }
    }

19 View Source File : CommandLineParser.cs
License : MIT License
Project Creator : 91Act

static bool ParseSubCharsCommand(int numForms, CommandSubCharsSet[] forms,
			string commandString, ArrayList indices)
		{
			indices.Clear();
			int numUsedChars = 0;
			for (int i = 0; i < numForms; i++)
			{
				CommandSubCharsSet charsSet = forms[i];
				int currentIndex = -1;
				int len = charsSet.Chars.Length;
				for (int j = 0; j < len; j++)
				{
					char c = charsSet.Chars[j];
					int newIndex = commandString.IndexOf(c);
					if (newIndex >= 0)
					{
						if (currentIndex >= 0)
							return false;
						if (commandString.IndexOf(c, newIndex + 1) >= 0)
							return false;
						currentIndex = j;
						numUsedChars++;
					}
				}
				if (currentIndex == -1 && !charsSet.EmptyAllowed)
					return false;
				indices.Add(currentIndex);
			}
			return (numUsedChars == commandString.Length);
		}

19 View Source File : PVPcheckPoint.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void Start()
    {
        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
        {
            UnityEngine.Object.Destroy(base.gameObject);
            return;
        }
        if (IN_GAME_MAIN_CAMERA.GameMode != GameMode.PVP_CAPTURE)
        {
            if (BasePV.IsMine)
            {
                UnityEngine.Object.Destroy(base.gameObject);
            }
            UnityEngine.Object.Destroy(base.gameObject);
            return;
        }
        PVPcheckPoint.chkPts.Add(this);
        IComparer comparer = new IComparerPVPchkPtID();
        PVPcheckPoint.chkPts.Sort(comparer);
        if (this.humanPt == this.humanPtMax)
        {
            this.state = CheckPointState.Human;
            if (BasePV.IsMine && FengGameManagerMKII.Level.MapName != "The City I")
            {
                this.supply = Optimization.Caching.Pool.NetworkEnable("aot_supply", base.transform.position - Vectors.up * (base.transform.position.y - this.getHeight(base.transform.position)), base.transform.rotation, 0);
            }
        }
        else if (BasePV.IsMine && !this.hasAnnie)
        {
            if (UnityEngine.Random.Range(0, 100) < 50)
            {
                int num = UnityEngine.Random.Range(1, 2);
                for (int i = 0; i < num; i++)
                {
                    this.newreplacedan();
                }
            }
            if (this.isBase)
            {
                this.newreplacedan();
            }
        }
        if (this.replacedanPt == this.replacedanPtMax)
        {
            this.state = CheckPointState.replacedan;
        }
        this.hitTestR = 15f * this.size;
        base.transform.localScale = new Vector3(this.size, this.size, this.size);
    }

19 View Source File : COLOSSAL_TITAN.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void callreplacedan(bool special = false)
    {
        if (!special && GameObject.FindGameObjectsWithTag("replacedan").Length > 6)
        {
            return;
        }
        GameObject[] array = GameObject.FindGameObjectsWithTag("replacedanRespawn");
        ArrayList arrayList = new ArrayList();
        foreach (GameObject gameObject in array)
        {
            if (gameObject.transform.parent.name == "replacedanRespawnCT")
            {
                arrayList.Add(gameObject);
            }
        }
        GameObject gameObject2 = (GameObject)arrayList[UnityEngine.Random.Range(0, arrayList.Count)];
        string[] array3 = new string[]
        {
            "replacedAN_VER3.1"
        };
        GameObject gameObject3;
        if (FengGameManagerMKII.LAN)
        {
            gameObject3 = (GameObject)Network.Instantiate(CacheResources.Load(array3[UnityEngine.Random.Range(0, array3.Length)]), gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        else
        {
            gameObject3 = Optimization.Caching.Pool.NetworkEnable(array3[UnityEngine.Random.Range(0, array3.Length)], gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        if (special)
        {
            GameObject[] array4 = GameObject.FindGameObjectsWithTag("route");
            GameObject gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            while (gameObject4.name != "routeCT")
            {
                gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            }
            gameObject3.GetComponent<replacedAN>().SetRoute(gameObject4);
            gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Aberrant, false);
            gameObject3.GetComponent<replacedAN>().activeRad = 0;
            gameObject3.GetComponent<replacedAN>().ToCheckPoint((Vector3)gameObject3.GetComponent<replacedAN>().checkPoints[0], 10f);
        }
        else
        {
            float num = 0.7f;
            float num2 = 0.7f;
            if (IN_GAME_MAIN_CAMERA.Difficulty != 0)
            {
                if (IN_GAME_MAIN_CAMERA.Difficulty == 1)
                {
                    num = 0.4f;
                    num2 = 0.7f;
                }
                else if (IN_GAME_MAIN_CAMERA.Difficulty == 2)
                {
                    num = -1f;
                    num2 = 0.7f;
                }
            }
            if (GameObject.FindGameObjectsWithTag("replacedan").Length == 5)
            {
                gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
            }
            else if (UnityEngine.Random.Range(0f, 1f) >= num)
            {
                if (UnityEngine.Random.Range(0f, 1f) < num2)
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
                }
                else
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Crawler, false);
                }
            }
            gameObject3.GetComponent<replacedAN>().activeRad = 200;
        }
        if (FengGameManagerMKII.LAN)
        {
            GameObject gameObject5 = (GameObject)Network.Instantiate(CacheResources.Load("FX/FXreplacedanSpawn"), gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject5.transform.localScale = gameObject3.transform.localScale;
        }
        else
        {
            GameObject gameObject6 = Optimization.Caching.Pool.NetworkEnable("FX/FXreplacedanSpawn", gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject6.transform.localScale = gameObject3.transform.localScale;
        }
    }

19 View Source File : MangaDB.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public override void Add(replacedle replacedle)
        {
            mangas.Add(replacedle);
        }

19 View Source File : EffectLayer.cs
License : GNU General Public License v3.0
Project Creator : aelariane

protected ArrayList InitAffectors(EffectNode node)
    {
        ArrayList arrayList = new ArrayList();
        if (this.UVAffectorEnable)
        {
            UVAnimation uvanimation = new UVAnimation();
            Texture texture = this.Vertexpool.GetMaterial().GetTexture("_MainTex");
            if (this.UVType == 2)
            {
                uvanimation.BuildFromFile(this.EanPath, this.EanIndex, this.UVTime, texture);
                this.OriLowerLeftUV = uvanimation.frames[0];
                this.OriUVDimensions = uvanimation.UVDimensions[0];
            }
            else if (this.UVType == 1)
            {
                float num = (float)(texture.width / this.Cols);
                float num2 = (float)(texture.height / this.Rows);
                Vector2 vector = new Vector2(num / (float)texture.width, num2 / (float)texture.height);
                Vector2 vector2 = new Vector2(0f, 1f);
                uvanimation.BuildUVAnim(vector2, vector, this.Cols, this.Rows, this.Cols * this.Rows);
                this.OriLowerLeftUV = vector2;
                this.OriUVDimensions = vector;
                this.OriUVDimensions.y = -this.OriUVDimensions.y;
            }
            if (uvanimation.frames.Length == 1)
            {
                this.OriLowerLeftUV = uvanimation.frames[0];
                this.OriUVDimensions = uvanimation.UVDimensions[0];
            }
            else
            {
                uvanimation.loopCycles = this.LoopCircles;
                Affector value = new UVAffector(uvanimation, this.UVTime, node);
                arrayList.Add(value);
            }
        }
        if (this.RotAffectorEnable && this.RotateType != RSTYPE.NONE)
        {
            Affector value2;
            if (this.RotateType == RSTYPE.CURVE)
            {
                value2 = new RotateAffector(this.RotateCurve, node);
            }
            else
            {
                value2 = new RotateAffector(this.DeltaRot, node);
            }
            arrayList.Add(value2);
        }
        if (this.ScaleAffectorEnable && this.ScaleType != RSTYPE.NONE)
        {
            Affector value3;
            if (this.ScaleType == RSTYPE.CURVE)
            {
                value3 = new ScaleAffector(this.ScaleXCurve, this.ScaleYCurve, node);
            }
            else
            {
                value3 = new ScaleAffector(this.DeltaScaleX, this.DeltaScaleY, node);
            }
            arrayList.Add(value3);
        }
        if (this.ColorAffectorEnable && this.ColorAffectType != 0)
        {
            ColorAffector value4;
            if (this.ColorAffectType == 2)
            {
                value4 = new ColorAffector(new Color[]
                {
                    this.Color1,
                    this.Color2,
                    this.Color3,
                    this.Color4
                }, this.ColorGradualTimeLength, this.ColorGradualType, node);
            }
            else
            {
                value4 = new ColorAffector(new Color[]
                {
                    this.Color1,
                    this.Color2
                }, this.ColorGradualTimeLength, this.ColorGradualType, node);
            }
            arrayList.Add(value4);
        }
        if (this.LinearForceAffectorEnable)
        {
            Affector value5 = new LinearForceAffector(this.LinearForce.normalized * this.LinearMagnitude, node);
            arrayList.Add(value5);
        }
        if (this.JetAffectorEnable)
        {
            Affector value6 = new JetAffector(this.JetMin, this.JetMax, node);
            arrayList.Add(value6);
        }
        if (this.VortexAffectorEnable)
        {
            Affector value7;
            if (this.UseVortexCurve)
            {
                value7 = new VortexAffector(this.VortexCurve, this.VortexDirection, node);
            }
            else
            {
                value7 = new VortexAffector(this.VortexMag, this.VortexDirection, node);
            }
            arrayList.Add(value7);
        }
        if (this.AttractionAffectorEnable)
        {
            Affector value8;
            if (this.UseVortexCurve)
            {
                value8 = new AttractionForceAffector(this.AttractionCurve, this.AttractionPosition, node);
            }
            else
            {
                value8 = new AttractionForceAffector(this.AttractMag, this.AttractionPosition, node);
            }
            arrayList.Add(value8);
        }
        return arrayList;
    }

19 View Source File : DownloadManager.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public void AddMDToQueue(Manga m, dynamic chapterIDs, bool isUpdate)
        {
            foreach (var chapterID in chapterIDs)
            {
                foreach (var chapterNum in chapterID)
                {
                    if (chapterNum.lang_code == m.settings.lang && // Correct language
                        (m.settings.group == "{Any}" || chapterNum.group_name == m.settings.group) && // Correct group
                        !IsQueueDuplicate(m, (string)chapterNum.chapter)) // Not a dupe chapter
                    {
                        if ((isUpdate && !Directory.Exists(m.mangaDirectory.FullName + "\\" + chapterNum.chapter)) || // If "update" only add if the folder doesn't exist
                            !isUpdate)
                        {
                            string dlUrl = "https://mangadex.org/chapter/" + chapterID.Name + "/1";
                            Download dl = CreateMDDownload((string)chapterNum.chapter, chapterID.Name, m, dlUrl);

                            Logger.Log("Adding MD to queue '" + m.name  + " chapter " + dl.chapterNumber + "'");
                            downloadQueue.Push(dl);
                            downloads.Add(dl);
                            downloadCount++;
                        }
                    }
                }
            }
            DownloadNextFromQueue();
        }

19 View Source File : XffectCache.cs
License : GNU General Public License v3.0
Project Creator : aelariane

protected Transform AddObject(string name)
    {
        Transform transform = base.transform.Find(name);
        if (transform == null)
        {
            Debug.Log("object:" + name + "doesn't exist!");
            return null;
        }
        Transform transform2 = UnityEngine.Object.Instantiate(transform, Vectors.zero, Quaternion.idenreplacedy) as Transform;
        this.ObjectDic[name].Add(transform2);
        transform2.gameObject.SetActive(false);
        Xffect component = transform2.GetComponent<Xffect>();
        if (component != null)
        {
            component.Initialize();
        }
        return transform2;
    }

19 View Source File : BreakfastMenu.cs
License : GNU General Public License v3.0
Project Creator : abishekaditya

private void AddItem(string name, string description, int price, bool veg)
        {
            var item = new Menu(name, description, price, veg);
            _items.Add(item);
        }

19 View Source File : FileService.cs
License : GNU General Public License v2.0
Project Creator : afrantzis

private bool AskForSaveIfFilesChanged()
	{
		ArrayList list = new ArrayList();

		// create a list with the changed files
		int i = 0;
		foreach (DataViewDisplay dv in dataBook.Children) {
			ByteBuffer bb = dv.View.Buffer;
			if (bb.HasChanged)
				list.Add(new SaveFileItem(true, bb.Filename, i));
			i++;
		}

		if (list.Count == 0)
			return true;

		// special handling if only one file changed
		if (list.Count == 1) {
			int page = ((SaveFileItem)list[0]).Page;
			// make the page active
			dataBook.Page = page;

			DataView dv = ((DataViewDisplay)dataBook.GetNthPage(page)).View;
			return AskForSaveIfFileChanged(dv);
		}

		// show the confirmation alert
		SaveFileItem[] array = (SaveFileItem[])list.ToArray(typeof(SaveFileItem));

		SaveConfirmationMultiAlert sca = new SaveConfirmationMultiAlert(array, mainWindow);
		ResponseType res = (ResponseType)sca.Run();
		sca.Destroy();

		// handle responses
		if (res == ResponseType.Ok) {
			bool allSaved = true;

			// save the files the user specified
			foreach(SaveFileItem item in array) {
				if (item.Save == true) {
					DataView dv = ((DataViewDisplay)dataBook.GetNthPage(item.Page)).View;
					// make page active
					dataBook.Page = item.Page;
					// try to save the file
					if (SaveFile(dv, null, false, true) == false)
						allSaved = false;
					else {
						//UpdateTabLabel(dv);
						//UpdateWindowreplacedle(dv);
					}
				}
			}

			return allSaved;
		}
		else if (res == ResponseType.No){
			return true;
		}
		else /*if (res==ResponseType.Cancel)*/
			return false;
	}

19 View Source File : ToolWindow.xaml.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

private async void startIdler(bool delayed)
        {
            foreach (ListViewItem item in listView1.SelectedItems)
            {
                if (delayed)
                    await Task.Delay(4000);
                runningProc.Add(Process.Start(new ProcessStartInfo(STEAM_GAME_CONTROLLER, item.Tag.ToString()) { WindowStyle = ProcessWindowStyle.Hidden }));
            }
        }

19 View Source File : RangeCollection.cs
License : GNU General Public License v2.0
Project Creator : afrantzis

public new void Clear()
	{
		base.Clear();
		Add(new Range());
	}

19 View Source File : AdColonyUtils.cs
License : Apache License 2.0
Project Creator : AdColony

ArrayList ParseArray(char[] json, ref int index)
        {
            ArrayList array = new ArrayList();

            // [
            NextToken(json, ref index);

            bool done = false;
            while (!done)
            {
                JsonToken token = LookAhead(json, index);
                if (token == JsonToken.NONE)
                {
                    return null;
                }
                else if (token == JsonToken.COMMA)
                {
                    NextToken(json, ref index);
                }
                else if (token == JsonToken.SQUARED_CLOSE)
                {
                    NextToken(json, ref index);
                    break;
                }
                else
                {
                    bool success = true;
                    object value = ParseValue(json, ref index, ref success);
                    if (!success)
                    {
                        return null;
                    }

                    array.Add(value);
                }
            }

            return array;
        }

19 View Source File : DataConverter.cs
License : GNU General Public License v3.0
Project Creator : aiportal

private static object ArrayFromString(string str, Type type)
		{
			Debug.replacedert(!string.IsNullOrEmpty(str));
			Debug.replacedert(type.IsArray);

			string[] vals = str.Split(new char[] { ArraySeparator });
			var list = new System.Collections.ArrayList(vals.Length);
			var t = type.GetElementType();
			for (int i = 0; i < vals.Length; ++i)
				list.Add(ObjectFromString(vals[i], t));
			return list.ToArray(t);
		}

19 View Source File : CommandLineParser.cs
License : MIT License
Project Creator : 91Act

bool ParseString(string srcString, SwitchForm[] switchForms)
		{
			int len = srcString.Length;
			if (len == 0)
				return false;
			int pos = 0;
			if (!IsItSwitchChar(srcString[pos]))
				return false;
			while (pos < len)
			{
				if (IsItSwitchChar(srcString[pos]))
					pos++;
				const int kNoLen = -1;
				int matchedSwitchIndex = 0;
				int maxLen = kNoLen;
				for (int switchIndex = 0; switchIndex < _switches.Length; switchIndex++)
				{
					int switchLen = switchForms[switchIndex].IDString.Length;
					if (switchLen <= maxLen || pos + switchLen > len)
						continue;
					if (String.Compare(switchForms[switchIndex].IDString, 0,
							srcString, pos, switchLen, true) == 0)
					{
						matchedSwitchIndex = switchIndex;
						maxLen = switchLen;
					}
				}
				if (maxLen == kNoLen)
					throw new Exception("maxLen == kNoLen");
				SwitchResult matchedSwitch = _switches[matchedSwitchIndex];
				SwitchForm switchForm = switchForms[matchedSwitchIndex];
				if ((!switchForm.Multi) && matchedSwitch.ThereIs)
					throw new Exception("switch must be single");
				matchedSwitch.ThereIs = true;
				pos += maxLen;
				int tailSize = len - pos;
				SwitchType type = switchForm.Type;
				switch (type)
				{
					case SwitchType.PostMinus:
						{
							if (tailSize == 0)
								matchedSwitch.WithMinus = false;
							else
							{
								matchedSwitch.WithMinus = (srcString[pos] == kSwitchMinus);
								if (matchedSwitch.WithMinus)
									pos++;
							}
							break;
						}
					case SwitchType.PostChar:
						{
							if (tailSize < switchForm.MinLen)
								throw new Exception("switch is not full");
							string charSet = switchForm.PostCharSet;
							const int kEmptyCharValue = -1;
							if (tailSize == 0)
								matchedSwitch.PostCharIndex = kEmptyCharValue;
							else
							{
								int index = charSet.IndexOf(srcString[pos]);
								if (index < 0)
									matchedSwitch.PostCharIndex = kEmptyCharValue;
								else
								{
									matchedSwitch.PostCharIndex = index;
									pos++;
								}
							}
							break;
						}
					case SwitchType.LimitedPostString:
					case SwitchType.UnLimitedPostString:
						{
							int minLen = switchForm.MinLen;
							if (tailSize < minLen)
								throw new Exception("switch is not full");
							if (type == SwitchType.UnLimitedPostString)
							{
								matchedSwitch.PostStrings.Add(srcString.Substring(pos));
								return true;
							}
							String stringSwitch = srcString.Substring(pos, minLen);
							pos += minLen;
							for (int i = minLen; i < switchForm.MaxLen && pos < len; i++, pos++)
							{
								char c = srcString[pos];
								if (IsItSwitchChar(c))
									break;
								stringSwitch += c;
							}
							matchedSwitch.PostStrings.Add(stringSwitch);
							break;
						}
				}
			}
			return true;

		}

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeBlockElements()
        {
            _htmlBlockElements = new ArrayList();

            _htmlBlockElements.Add("blockquote");
            _htmlBlockElements.Add("body");
            _htmlBlockElements.Add("caption");
            _htmlBlockElements.Add("center");
            _htmlBlockElements.Add("cite");
            _htmlBlockElements.Add("dd");
            _htmlBlockElements.Add("dir"); //  treat as UL element
            _htmlBlockElements.Add("div");
            _htmlBlockElements.Add("dl");
            _htmlBlockElements.Add("dt");
            _htmlBlockElements.Add("form"); // Not a block according to XHTML spec
            _htmlBlockElements.Add("h1");
            _htmlBlockElements.Add("h2");
            _htmlBlockElements.Add("h3");
            _htmlBlockElements.Add("h4");
            _htmlBlockElements.Add("h5");
            _htmlBlockElements.Add("h6");
            _htmlBlockElements.Add("html");
            _htmlBlockElements.Add("li");
            _htmlBlockElements.Add("menu"); //  treat as UL element
            _htmlBlockElements.Add("ol");
            _htmlBlockElements.Add("p");
            _htmlBlockElements.Add("pre"); // Renders text in a fixed-width font
            _htmlBlockElements.Add("table");
            _htmlBlockElements.Add("tbody");
            _htmlBlockElements.Add("td");
            _htmlBlockElements.Add("textarea");
            _htmlBlockElements.Add("tfoot");
            _htmlBlockElements.Add("th");
            _htmlBlockElements.Add("thead");
            _htmlBlockElements.Add("tr");
            _htmlBlockElements.Add("tt");
            _htmlBlockElements.Add("ul");
        }

19 View Source File : AHSSShotGunCollider.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        if (!isLocal)
        {
            return;
        }

        if (this.active_me)
        {
            switch (other.gameObject.tag)
            {
                case "playerHitbox":
                    if (!FengGameManagerMKII.Level.PVPEnabled)
                    {
                        return;
                    }
                    float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                    num = Mathf.Min(1f, num);
                    HitBox component = other.gameObject.GetComponent<HitBox>();
                    if (component != null && component.transform.root != null)
                    {
                        if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                        {
                            return;
                        }
                        if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                                {
                                    component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                                }
                            }
                            else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().MarkDie();
                                component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                                {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                this.viewID,
                                this.ownerName,
                                false
                                });
                            }
                        }
                    }
                    break;

                case "replacedanneck":
                    HitBox component2 = other.gameObject.GetComponent<HitBox>();
                    if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                    {
                        component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                        this.currentHits.Add(component2);
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num2 = Mathf.Max(10, num2);
                                FengGameManagerMKII.FGM.netShowDamage(num2);
                                if ((float)num2 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    component2.transform.root.GetComponent<replacedAN>().Die();
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                                    }
                                    FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                                }
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.GetComponent<PhotonView>().BasePV.IsMine)
                        {
                            if (component2.transform.root.GetComponent<replacedAN>())
                            {
                                if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                                {
                                    int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                    num3 = Mathf.Max(10, num3);
                                    if ((float)num3 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                    {
                                        if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                        {
                                            IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                            component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                        }
                                        component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                        {
                                        baseT.root.gameObject.GetPhotonView().viewID,
                                        num3
                                        });
                                    }
                                }
                            }
                            else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                            {
                                int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num4 = Mathf.Max(10, num4);
                                if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                    });
                                }
                            }
                            else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num5
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num6 = Mathf.Max(10, num6);
                                if ((float)num6 > component2.transform.root.GetComponent<replacedAN>().myLevel * 100f)
                                {
                                    if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                                    {
                                        IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                                    }
                                    component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                                }
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num7 = Mathf.Max(10, num7);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                                }
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>() && !component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;

                case "erenHitbox":
                    if (this.dmg > 0 && !other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().ireplaced)
                    {
                        other.gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().hitByreplacedan();
                    }
                    break;

                case "replacedaneye":
                    if (!this.currentHits.Contains(other.gameObject))
                    {
                        this.currentHits.Add(other.gameObject);
                        GameObject gameObject = other.gameObject.transform.root.gameObject;
                        if (gameObject.GetComponent<FEMALE_replacedAN>())
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().hitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                        }
                        else if (gameObject.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                        {
                            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().HitEye();
                                }
                            }
                            else if (!PhotonNetwork.IsMasterClient || !gameObject.GetPhotonView().IsMine)
                            {
                                if (!gameObject.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    break;

                case "replacedanankle":
                    if (currentHits.Contains(other.gameObject))
                    {
                        return;
                    }

                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject2.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                    num9 = Mathf.Max(10, num9);
                    if (gameObject2.GetComponent<replacedAN>() && gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                        }
                        else
                        {
                            if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                            {
                                if (!gameObject2.GetComponent<replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitAnkle();
                            }
                            this.showCriticalHitFX(other.gameObject.transform.position);
                        }
                    }
                    else if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (other.gameObject.name == "ankleR")
                            {
                                if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                                }
                            }
                            else if (gameObject2.GetComponent<FEMALE_replacedAN>() && !gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                            }
                        }
                        else if (other.gameObject.name == "ankleR")
                        {
                            if (!PhotonNetwork.IsMasterClient)
                            {
                                if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                                {
                                    gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                    {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                    });
                                }
                            }
                            else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                                {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                        this.showCriticalHitFX(other.gameObject.transform.position);
                    }
                    break;
            }
        }
    }

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeOtherOpenableElements()
        {
            // It is a list of known html elements which we
            // want to allow to produce bt HTML parser,
            // but don'tt want to act as inline, block or no-scope.
            // Presence in this list will allow to open
            // elements during html parsing, and adding the
            // to a tree produced by html parser.
            _htmlOtherOpenableElements = new ArrayList();
            _htmlOtherOpenableElements.Add("applet");
            _htmlOtherOpenableElements.Add("base");
            _htmlOtherOpenableElements.Add("basefont");
            _htmlOtherOpenableElements.Add("colgroup");
            _htmlOtherOpenableElements.Add("fieldset");
            //_htmlOtherOpenableElements.Add("form"); --> treated as block
            _htmlOtherOpenableElements.Add("frameset");
            _htmlOtherOpenableElements.Add("head");
            _htmlOtherOpenableElements.Add("iframe");
            _htmlOtherOpenableElements.Add("map");
            _htmlOtherOpenableElements.Add("noframes");
            _htmlOtherOpenableElements.Add("noscript");
            _htmlOtherOpenableElements.Add("object");
            _htmlOtherOpenableElements.Add("optgroup");
            _htmlOtherOpenableElements.Add("option");
            _htmlOtherOpenableElements.Add("script");
            _htmlOtherOpenableElements.Add("select");
            _htmlOtherOpenableElements.Add("style");
            _htmlOtherOpenableElements.Add("replacedle");
        }

19 View Source File : AccountController.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

public void AddFriend(Friend item)
        {
            bool found = false;
            foreach (Friend var in friendArray)
            {
                Friend temp = (Friend)var;
                if (temp.steamFrindsID.ToLower().Equals(item.steamFrindsID.ToLower()))
                {
                    found = true;
                }
            }
            if (!found)
            {                
                friendArray.Add(item);
            }                
        }

19 View Source File : HtmlSchema.cs
License : GNU Affero General Public License v3.0
Project Creator : akshinmustafayev

private static void InitializeElementsClosingOnParentElementEnd()
        {
            _htmlElementsClosingOnParentElementEnd = new ArrayList();
            _htmlElementsClosingOnParentElementEnd.Add("body");
            _htmlElementsClosingOnParentElementEnd.Add("colgroup");
            _htmlElementsClosingOnParentElementEnd.Add("dd");
            _htmlElementsClosingOnParentElementEnd.Add("dt");
            _htmlElementsClosingOnParentElementEnd.Add("head");
            _htmlElementsClosingOnParentElementEnd.Add("html");
            _htmlElementsClosingOnParentElementEnd.Add("li");
            _htmlElementsClosingOnParentElementEnd.Add("p");
            _htmlElementsClosingOnParentElementEnd.Add("tbody");
            _htmlElementsClosingOnParentElementEnd.Add("td");
            _htmlElementsClosingOnParentElementEnd.Add("tfoot");
            _htmlElementsClosingOnParentElementEnd.Add("thead");
            _htmlElementsClosingOnParentElementEnd.Add("th");
            _htmlElementsClosingOnParentElementEnd.Add("tr");
        }

19 View Source File : TriggerColliderWeapon.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        //if (this.ActiveMe)
        //{
        if (!this.currentHitsII.Contains(other.gameObject))
        {
            this.currentHitsII.Add(other.gameObject);
            IN_GAME_MAIN_CAMERA.MainCamera.startShake(0.1f, 0.1f, 0.95f);
            if (other.gameObject.transform.root.gameObject.CompareTag("replacedan"))
            {
                IN_GAME_MAIN_CAMERA.MainHERO.slashHit.Play();
                if (IN_GAME_MAIN_CAMERA.GameType != GameType.Single)
                {
                    Optimization.Caching.Pool.NetworkEnable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f), 0);
                }
                else
                {
                    Pool.Enable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f));//(GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("hitMeat"));
                }
                //gameObject.transform.position = baseT.position;
                baseT.root.GetComponent<HERO>().useBlade(0);
            }
        }
        switch (other.gameObject.tag)
        {
            case "playerHitbox":
                if (!FengGameManagerMKII.Level.PVPEnabled)
                {
                    return;
                }
                float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                num = Mathf.Min(1f, num);
                HitBox component = other.gameObject.GetComponent<HitBox>();
                if (component != null && component.transform.root != null)
                {
                    if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                    {
                        return;
                    }
                    if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                            }
                        }
                        else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                        {
                            component.transform.root.GetComponent<HERO>().MarkDie();
                            component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                            {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                baseT.root.gameObject.GetPhotonView().viewID,
                                PhotonView.Find(baseT.root.gameObject.GetPhotonView().viewID).owner.Properties[PhotonPlayerProperty.name],
                                false
                            });
                        }
                    }
                }
                break;

            case "replacedanneck":
                HitBox component2 = other.gameObject.GetComponent<HitBox>();
                if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                {
                    component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                    this.currentHits.Add(component2);
                    this.meatDie.Play();
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num2 = Mathf.Max(10, num2);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().Die();
                            this.napeMeat(IN_GAME_MAIN_CAMERA.MainR.velocity, component2.transform.root);
                            FengGameManagerMKII.FGM.netShowDamage(num2);
                            FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.gameObject.GetPhotonView().IsMine)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num3 = Mathf.Max(10, num3);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                    component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                }
                                component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num3
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num4 = Mathf.Max(10, num4);
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num5
                                });
                            }
                        }
                    }
                    else if (component2.transform.root.GetComponent<replacedAN>())
                    {
                        if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num6 = Mathf.Max(10, num6);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                        }
                    }
                    else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num7 = Mathf.Max(10, num7);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                        }
                    }
                    else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                    }
                    this.showCriticalHitFX();
                }
                break;

            case "replacedaneye":
                if (!this.currentHits.Contains(other.gameObject))
                {
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                    }
                    else if (gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                        this.showCriticalHitFX();
                    }
                }
                break;

            case "replacedanankle":
                if (currentHits.Contains(other.gameObject))
                {
                    return;
                }

                this.currentHits.Add(other.gameObject);
                GameObject gameObject3 = other.gameObject.transform.root.gameObject;
                int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject3.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                num9 = Mathf.Max(10, num9);
                if (gameObject3.GetComponent<replacedAN>() && gameObject3.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                    }
                    else
                    {
                        if (!PhotonNetwork.IsMasterClient || !gameObject3.GetPhotonView().IsMine)
                        {
                            if (!gameObject3.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                        this.showCriticalHitFX();
                    }
                }
                else if (gameObject3.GetComponent<FEMALE_replacedAN>())
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (other.gameObject.name == "ankleR")
                        {
                            if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                            }
                        }
                        else if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                        }
                    }
                    else if (other.gameObject.name == "ankleR")
                    {
                        if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient)
                    {
                        if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                            {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                            });
                        }
                    }
                    else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                    {
                        gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                    }
                    this.showCriticalHitFX();
                }
                break;
        }
        //}
    }

19 View Source File : FrmStartPage.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public void RefreshContents()
        {
            Logger.Log("Refreshing");
            lstManga.Items.Clear();
            lstHentai.Items.Clear();
            mangas.Clear();
            DirectoryInfo root = new DirectoryInfo(homeFolder);
            DirectoryInfo[] dirs = root.GetDirectories("*", SearchOption.TopDirectoryOnly);

            foreach (DirectoryInfo dir in dirs)
            {
                // Logger.Log("Refreshing data for directory '" + dir.Name + "'");
                if (dir.Name == "update")
                    continue;
                else if (!dir.Name.StartsWith("h"))
                {
                    var json = File.ReadAllText(dir.FullName + "\\manga.json");
                    var tracker = File.ReadAllText(dir.FullName + "\\tracker");
                    string[] trackerData = tracker.Split('|');
                    // Deserialize the JSON file
                    dynamic contents = JsonConvert.DeserializeObject(json);
                    string mangaName = contents.manga.replacedle;
                    Manga m = new Manga(mangaName, dir, trackerData[0], trackerData[1]);
                    m.LoadSettings();
                    if (m.settings.name == "" || m.settings.name == null)
                    {
                        m.SaveSettings(m.settings.lang, m.settings.group, mangaName);
                        m.LoadSettings();
                    }

                    mangas.Add(m);
                    string name = m.settings.name;
                    if (name.Length > 21)
                    {
                        name = name.Substring(0, 21);
                    }
                    else
                    {
                        name = name.PadRight(21);
                    }
                    lstManga.Items.Add(name + "  »  c" + trackerData[0] + ",p" + trackerData[1]);
                }
                else // Hentai
                {
                    string replacedle = File.ReadAllText(dir.FullName + "\\replacedle");
                    var tracker = File.ReadAllText(dir.FullName + "\\tracker");
                    string[] trackerData = tracker.Split('|');

                    Manga m = new Manga(replacedle, dir, trackerData[0], trackerData[1]);
                    mangas.Add(m);
                    string name = m.name;
                    if (name.Length > 21)
                    {
                        name = name.Substring(0, 21);
                    }
                    else
                    {
                        name = name.PadRight(21);
                    }
                    lstHentai.Items.Add(name + "  »  p" + trackerData[1]);
                }
            }
            if (lstManga.Items.Count > 0)
            {
                lstManga.SelectedIndex = 0;
            }
            if (lstHentai.Items.Count > 0)
            {
                lstHentai.SelectedIndex = 0;
            }
        }

19 View Source File : AccountController.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

public static void addAccount(String paraUsername, String paraPreplacedword, bool paraDesktopAuth)
        {
            bool found = false;
            foreach (var item in userAccounts)
            {
                UserAccount temp = (UserAccount)item;
                if (temp.username.ToLower().Equals(paraUsername.ToLower()))
                {
                    found = true;
                }
            }
            if (!found)
            {
                userAccounts.Add(new UserAccount { username = paraUsername, preplacedword = paraPreplacedword, desktopAuth = paraDesktopAuth });
            }
        }

19 View Source File : AccountController.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

public void newMessage(String n, String msg)
        {
            chatLog.Add(n + ": " + msg);
        }

19 View Source File : Download.cs
License : GNU General Public License v3.0
Project Creator : 9vult

private void DownloadAsync(Uri imgUrl, string imgFile)
        {
            using (WebClient wc = new WebClient())
            {
                Logger.Log("[DL] Downloading '" + imgUrl + "' to '" + imgFile + "'");
                clients.Add(wc);
                wc.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompletedCallback);
                wc.DownloadFileAsync(imgUrl, imgFile);
            }
        }

19 View Source File : HentaiDB.cs
License : GNU General Public License v3.0
Project Creator : 9vult

public override void Add(replacedle replacedle)
        {
            hentais.Add(replacedle);
        }

19 View Source File : TriggerColliderWeapon.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void OnTriggerStay(Collider other)
    {
        //if (this.ActiveMe)
        //{
        if (!this.currentHitsII.Contains(other.gameObject))
        {
            this.currentHitsII.Add(other.gameObject);
            IN_GAME_MAIN_CAMERA.MainCamera.startShake(0.1f, 0.1f, 0.95f);
            if (other.gameObject.transform.root.gameObject.CompareTag("replacedan"))
            {
                IN_GAME_MAIN_CAMERA.MainHERO.slashHit.Play();
                if (IN_GAME_MAIN_CAMERA.GameType != GameType.Single)
                {
                    Optimization.Caching.Pool.NetworkEnable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f), 0);
                }
                else
                {
                    Pool.Enable("hitMeat", baseT.position, Quaternion.Euler(270f, 0f, 0f));//(GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("hitMeat"));
                }
                //gameObject.transform.position = baseT.position;
                baseT.root.GetComponent<HERO>().useBlade(0);
            }
        }
        switch (other.gameObject.tag)
        {
            case "playerHitbox":
                if (!FengGameManagerMKII.Level.PVPEnabled)
                {
                    return;
                }
                float num = 1f - Vector3.Distance(other.gameObject.transform.position, baseT.position) * 0.05f;
                num = Mathf.Min(1f, num);
                HitBox component = other.gameObject.GetComponent<HitBox>();
                if (component != null && component.transform.root != null)
                {
                    if (component.transform.root.GetComponent<HERO>().myTeam == this.myTeam)
                    {
                        return;
                    }
                    if (!component.transform.root.GetComponent<HERO>().IsInvincible())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!component.transform.root.GetComponent<HERO>().IsGrabbed)
                            {
                                component.transform.root.GetComponent<HERO>().Die((component.transform.root.transform.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f, false);
                            }
                        }
                        else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !component.transform.root.GetComponent<HERO>().HasDied() && !component.transform.root.GetComponent<HERO>().IsGrabbed)
                        {
                            component.transform.root.GetComponent<HERO>().MarkDie();
                            component.transform.root.GetComponent<HERO>().BasePV.RPC("netDie", PhotonTargets.All, new object[]
                            {
                                (component.transform.root.position - baseT.position).normalized * num * 1000f + Vectors.up * 50f,
                                false,
                                baseT.root.gameObject.GetPhotonView().viewID,
                                PhotonView.Find(baseT.root.gameObject.GetPhotonView().viewID).owner.Properties[PhotonPlayerProperty.name],
                                false
                            });
                        }
                    }
                }
                break;

            case "replacedanneck":
                HitBox component2 = other.gameObject.GetComponent<HitBox>();
                if (component2 != null && this.checkIfBehind(component2.transform.root.gameObject) && !this.currentHits.Contains(component2))
                {
                    component2.hitPosition = (baseT.position + component2.transform.position) * 0.5f;
                    this.currentHits.Add(component2);
                    this.meatDie.Play();
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>() && !component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num2 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num2 = Mathf.Max(10, num2);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num2)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num2, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().Die();
                            this.napeMeat(IN_GAME_MAIN_CAMERA.MainR.velocity, component2.transform.root);
                            FengGameManagerMKII.FGM.netShowDamage(num2);
                            FengGameManagerMKII.FGM.PlayerKillInfoSingleUpdate(num2);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient || !component2.transform.root.gameObject.GetPhotonView().IsMine)
                    {
                        if (component2.transform.root.GetComponent<replacedAN>())
                        {
                            if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                            {
                                int num3 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num3 = Mathf.Max(10, num3);
                                if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num3)
                                {
                                    IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num3, component2.transform.root.gameObject, 0.02f);
                                    component2.transform.root.GetComponent<replacedAN>().asClientLookTarget = false;
                                }
                                component2.transform.root.GetComponent<replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num3
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            int num4 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num4 = Mathf.Max(10, num4);
                            if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<FEMALE_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num4
                                });
                            }
                        }
                        else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                        {
                            baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                            if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                            {
                                int num5 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                                num5 = Mathf.Max(10, num5);
                                component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.RPC("replacedanGetHit", component2.transform.root.GetComponent<COLOSSAL_replacedAN>().BasePV.owner, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num5
                                });
                            }
                        }
                    }
                    else if (component2.transform.root.GetComponent<replacedAN>())
                    {
                        if (!component2.transform.root.GetComponent<replacedAN>().hasDie)
                        {
                            int num6 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num6 = Mathf.Max(10, num6);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num6)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num6, component2.transform.root.gameObject, 0.02f);
                            }
                            component2.transform.root.GetComponent<replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num6);
                        }
                    }
                    else if (component2.transform.root.GetComponent<FEMALE_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            int num7 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num7 = Mathf.Max(10, num7);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num7)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num7, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<FEMALE_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num7);
                        }
                    }
                    else if (component2.transform.root.GetComponent<COLOSSAL_replacedAN>())
                    {
                        baseT.root.GetComponent<HERO>().useBlade(int.MaxValue);
                        if (!component2.transform.root.GetComponent<COLOSSAL_replacedAN>().hasDie)
                        {
                            int num8 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - component2.transform.root.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                            num8 = Mathf.Max(10, num8);
                            if (Settings.Snapshots.ToValue() && Settings.SnapshotsDamage.Value <= num8)
                            {
                                IN_GAME_MAIN_CAMERA.MainCamera.startSnapShot(component2.transform.position, num8, null, 0.02f);
                            }
                            component2.transform.root.GetComponent<COLOSSAL_replacedAN>().replacedanGetHit(baseT.root.gameObject.GetPhotonView().viewID, num8);
                        }
                    }
                    this.showCriticalHitFX();
                }
                break;

            case "replacedaneye":
                if (!this.currentHits.Contains(other.gameObject))
                {
                    this.currentHits.Add(other.gameObject);
                    GameObject gameObject2 = other.gameObject.transform.root.gameObject;
                    if (gameObject2.GetComponent<FEMALE_replacedAN>())
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().hitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<FEMALE_replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                    }
                    else if (gameObject2.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().HitEye();
                            }
                        }
                        else if (!PhotonNetwork.IsMasterClient || !gameObject2.GetPhotonView().IsMine)
                        {
                            if (!gameObject2.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject2.GetComponent<replacedAN>().BasePV.RPC("hitEyeRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject2.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject2.GetComponent<replacedAN>().hitEyeRPC(baseT.root.gameObject.GetPhotonView().viewID);
                        }
                        this.showCriticalHitFX();
                    }
                }
                break;

            case "replacedanankle":
                if (currentHits.Contains(other.gameObject)) return;
                this.currentHits.Add(other.gameObject);
                GameObject gameObject3 = other.gameObject.transform.root.gameObject;
                int num9 = (int)((IN_GAME_MAIN_CAMERA.MainR.velocity - gameObject3.rigidbody.velocity).magnitude * 10f * this.scoreMulti);
                num9 = Mathf.Max(10, num9);
                if (gameObject3.GetComponent<replacedAN>() && gameObject3.GetComponent<replacedAN>().abnormalType != AbnormalType.Crawler)
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                    }
                    else
                    {
                        if (!PhotonNetwork.IsMasterClient || !gameObject3.GetPhotonView().IsMine)
                        {
                            if (!gameObject3.GetComponent<replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<replacedAN>().BasePV.RPC("hitAnkleRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<replacedAN>().HitAnkle();
                        }
                        this.showCriticalHitFX();
                    }
                }
                else if (gameObject3.GetComponent<FEMALE_replacedAN>())
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                    {
                        if (other.gameObject.name == "ankleR")
                        {
                            if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleR(num9);
                            }
                        }
                        else if (gameObject3.GetComponent<FEMALE_replacedAN>() && !gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleL(num9);
                        }
                    }
                    else if (other.gameObject.name == "ankleR")
                    {
                        if (!PhotonNetwork.IsMasterClient)
                        {
                            if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                            {
                                gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, new object[]
                                {
                                    baseT.root.gameObject.GetPhotonView().viewID,
                                    num9
                                });
                            }
                        }
                        else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleRRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                        }
                    }
                    else if (!PhotonNetwork.IsMasterClient)
                    {
                        if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                        {
                            gameObject3.GetComponent<FEMALE_replacedAN>().BasePV.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, new object[]
                            {
                                baseT.root.gameObject.GetPhotonView().viewID,
                                num9
                            });
                        }
                    }
                    else if (!gameObject3.GetComponent<FEMALE_replacedAN>().hasDie)
                    {
                        gameObject3.GetComponent<FEMALE_replacedAN>().hitAnkleLRPC(baseT.root.gameObject.GetPhotonView().viewID, num9);
                    }
                    this.showCriticalHitFX();
                }
                break;
        }
        //}
    }

See More Examples