void M_BowControl()
    {
        _bowControl = FileExists("vBowControl.cs", Application.dataPath);
        if (_bowControl.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[4];
            adding[0]        = new M_Additions();
            adding[0].target = "if (animator) animator.SetTrigger(\"Spring\");";
            adding[0].add    = "if (animator) GetComponent<NetworkAnimator>().SetTrigger(\"Spring\");";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;
            adding[2]        = new M_Additions();
            adding[2].target = "if (animator) animator.SetTrigger(\"UnSpring\");";
            adding[2].add    = "if (animator) GetComponent<NetworkAnimator>().SetTrigger(\"UnSpring\");";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "if (animator) animator.SetTrigger(\"Shot\");";
            adding[3].add    = "if (animator) GetComponent<NetworkAnimator>().SetTrigger(\"Shot\");";
            adding[3].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_bowControl.path, newlines);
        }
    }
    void M_Character()
    {
        _character = FileExists("vCharacter.cs", Application.dataPath);
        if (_character.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[5];
            adding[0]        = new M_Additions();
            adding[0].target = "if (triggerRecoilHash.isValid) animator.SetTrigger(triggerRecoilHash);";
            adding[0].add    = "if (triggerRecoilHash.isValid) GetComponent<NetworkAnimator>().SetTrigger(triggerRecoilHash);";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;
            adding[2]        = new M_Additions();
            adding[2].target = "if (triggerReactionHash.isValid) animator.SetTrigger(triggerReactionHash);";
            adding[2].add    = "if (triggerReactionHash.isValid) GetComponent<NetworkAnimator>().SetTrigger(triggerReactionHash);";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "if (triggerResetStateHash.isValid) animator.SetTrigger(triggerResetStateHash);";
            adding[3].add    = "if (triggerResetStateHash.isValid) GetComponent<NetworkAnimator>().SetTrigger(triggerResetStateHash);";
            adding[3].type   = M_FileAddtionType.Replace;
            adding[4]        = new M_Additions();
            adding[4].target = "if (triggerReactionHash.isValid) animator.SetTrigger(triggerReactionHash);";
            adding[4].add    = "if (triggerReactionHash.isValid) GetComponent<NetworkAnimator>().SetTrigger(triggerReactionHash);";
            adding[4].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_character.path, newlines);
        }
    }
    void M_AIAnimator()
    {
        _aiAnimator = FileExists("v_AIAnimator.cs", Application.dataPath);
        if (_aiAnimator.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[4];
            adding[0]        = new M_Additions();
            adding[0].target = "animator.SetTrigger(\"WeakAttack\");";
            adding[0].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"WeakAttack\");";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;
            adding[2]        = new M_Additions();
            adding[2].target = "animator.SetTrigger(\"TriggerRecoil\");";
            adding[2].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"TriggerRecoil\");";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "animator.SetTrigger(\"ResetState\");";
            adding[3].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"ResetState\");";
            adding[3].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_aiAnimator.path, newlines);
        }
    }
    M_FileData FileExists(string filename, string directory)
    {
        M_FileData    data = new M_FileData();
        DirectoryInfo dir  = new DirectoryInfo(directory);

        foreach (FileInfo file in dir.GetFiles("*.cs"))
        {
            if (file.Name == filename)
            {
                data.exists = true;
                data.path   = file.ToString();
                return(data);
            }
        }
        foreach (string subDir in Directory.GetDirectories(directory))
        {
            data = FileExists(filename, subDir);
            if (data.exists == true)
            {
                return(data);
            }
        }
        data.exists = false;
        data.path   = "";
        return(data);
    }
    void M_MeleeCombatInputCS()
    {
        _meleeCombatInput = FileExists("vMeleeCombatInput.cs", Application.dataPath);
        if (_meleeCombatInput.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[5];
            adding[0]        = new M_Additions();
            adding[0].target = "public void OnEnableAttack()";
            adding[0].add    = "public virtual void OnEnableAttack()";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "public void OnDisableAttack()";
            adding[1].add    = "public virtual void OnDisableAttack()";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "public void ResetAttackTriggers()";
            adding[2].add    = "public virtual void ResetAttackTriggers()";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "public void OnRecoil(int recoilID)";
            adding[3].add    = "public virtual void OnRecoil(int recoilID)";
            adding[3].type   = M_FileAddtionType.Replace;
            adding[4]        = new M_Additions();
            adding[4].target = "public void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[4].add    = "public virtual void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[4].type   = M_FileAddtionType.Replace;


            newlines.AddRange(adding);
            ModifyFile(_meleeCombatInput.path, newlines);
        }
    }
    void M_MeleeCombatInputCS()
    {
        _meleeCombatInput = FileExists("vMeleeCombatInput.cs", Application.dataPath);
        if (_meleeCombatInput.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[4];

            adding[0]          = new M_Additions();
            adding[0].target   = "if (meleeManager == null) meleeManager = GetComponent<vMeleeManager>();";
            adding[0].add      = "if (meleeManager == null) meleeManager = GetComponent<MultiplayerMeleeManager>();";
            adding[0].type     = M_FileAddtionType.Replace;
            adding[1]          = new M_Additions();
            adding[1].target   = "if (meleeManager == null) return;";
            adding[1].add      = "if (isLocalPlayer == false) return;";
            adding[1].type     = M_FileAddtionType.NewLine;
            adding[2]          = new M_Additions();
            adding[2].target   = "{";
            adding[2].add      = "    if (isLocalPlayer == false) return;";
            adding[2].nextline = "cc.lockRotation = false;";
            adding[2].type     = M_FileAddtionType.InsertLine;
            adding[3]          = new M_Additions();
            adding[3].target   = "{";
            adding[3].add      = "    if (isLocalPlayer == false) return;";
            adding[3].nextline = "cc.animator.ResetTrigger(\"WeakAttack\");";
            adding[3].type     = M_FileAddtionType.InsertLine;

            newlines.AddRange(adding);
            ModifyFile(_meleeCombatInput.path, newlines);
        }
    }
    void M_ThrowUI()
    {
        _monoBehavior = FileExists("vThrowUI.cs", Application.dataPath);
        if (_monoBehavior.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[5];
            adding[0]        = new M_Additions();
            adding[0].target = "public class vThrowUI : MonoBehaviour";
            adding[0].add    = "public class vThrowUI : NetworkBehaviour";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "void Start()";
            adding[1].add    = "protected virtual void Start()";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "throwManager = FindObjectOfType<vThrowObject>();";
            adding[2].add    = "//throwManager = FindObjectOfType<vThrowObject>();";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "using UnityEngine.UI;";
            adding[3].add    = "using UnityEngine.Networking;";
            adding[3].type   = M_FileAddtionType.NewLine;
            adding[4]        = new M_Additions();
            adding[4].target = "private void Start()";
            adding[4].add    = "protected virtual void Start()";
            adding[4].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_monoBehavior.path, newlines);
        }
    }
    void M_ThrowObject()
    {
        _throwObject = FileExists("vThrowObject.cs", Application.dataPath);
        if (_throwObject.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[9];
            adding[0]        = new M_Additions();
            adding[0].target = "void UpdateInput()";
            adding[0].add    = "protected virtual void UpdateInput()";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "private bool isAiming;";
            adding[1].add    = "protected bool isAiming;";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "private bool inThrow;";
            adding[2].add    = "protected bool inThrow;";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "vThirdPersonInput tpInput;";
            adding[3].add    = "protected vThirdPersonInput tpInput;";
            adding[3].type   = M_FileAddtionType.Replace;
            adding[4]        = new M_Additions();
            adding[4].target = "private bool isThrowInput;";
            adding[4].add    = "protected bool isThrowInput;";
            adding[4].type   = M_FileAddtionType.Replace;
            adding[5]        = new M_Additions();
            adding[5].target = "void UpdateThrow()";
            adding[5].add    = "protected virtual void UpdateThrow()";
            adding[5].type   = M_FileAddtionType.Replace;
            adding[6]        = new M_Additions();
            adding[6].target = "private LineRenderer lineRenderer;";
            adding[6].add    = "protected LineRenderer lineRenderer;";
            adding[6].type   = M_FileAddtionType.Replace;
            adding[7]        = new M_Additions();
            adding[7].target = "void DrawTrajectory()";
            adding[7].add    = "protected void DrawTrajectory()";
            adding[7].type   = M_FileAddtionType.Replace;
            adding[8]        = new M_Additions();
            adding[8].target = "IEnumerator Launch()";
            adding[8].add    = "protected IEnumerator Launch()";
            adding[8].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_throwObject.path, newlines);
        }
    }
    void M_AIController()
    {
        _aiController = FileExists("v_AIController.cs", Application.dataPath);
        if (_aiController.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[1];
            adding[0]        = new M_Additions();
            adding[0].target = "public void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[0].add    = "public virtual void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[0].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_aiController.path, newlines);
        }
    }
    void M_ControlAimCanvas()
    {
        _meleeCombatInput = FileExists("vControlAimCanvas.cs", Application.dataPath);
        if (_meleeCombatInput.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[1];
            adding[0]        = new M_Additions();
            adding[0].target = "public void SetWordPosition(Vector3 wordPosition, bool validPoint = true)";
            adding[0].add    = "public virtual void SetWordPosition(Vector3 wordPosition, bool validPoint = true)";
            adding[0].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_meleeCombatInput.path, newlines);
        }
    }
    void M_ControlAimCanvas()
    {
        _meleeCombatInput = FileExists("vControlAimCanvas.cs", Application.dataPath);
        if (_meleeCombatInput.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[1];
            adding[0]          = new M_Additions();
            adding[0].target   = "protected vThirdPersonController cc;";
            adding[0].add      = "public void SetCharacterController(vThirdPersonController controller) { cc = controller; }";
            adding[0].nextline = "protected UnityEvent onEnableAim { get { return currentAimCanvas.onEnableAim; } }";
            adding[0].type     = M_FileAddtionType.InsertLine;

            newlines.AddRange(adding);
            ModifyFile(_meleeCombatInput.path, newlines);
        }
    }
    void M_AIWeaponsControl()
    {
        _aiWeaponsControl = FileExists("v_AIWeaponsControl.cs", Application.dataPath);
        if (_aiWeaponsControl.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "ai.animator.SetTrigger(\"EquipItem\");";
            adding[0].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"EquipItem\");";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;

            newlines.AddRange(adding);
            ModifyFile(_aiWeaponsControl.path, newlines);
        }
    }
Beispiel #13
0
    void M_WeaponHolder()
    {
        _weaponHolder = FileExists("vWeaponHolder.cs", Application.dataPath);
        if (_weaponHolder.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "public void SetActiveHolder(bool active)";
            adding[0].add    = "public virtual void SetActiveHolder(bool active)";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "public void SetActiveWeapon(bool active)";
            adding[1].add    = "public virtual void SetActiveWeapon(bool active)";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_weaponHolder.path, newlines);
        }
    }
    void M_ShooterManager()
    {
        _shooterManager = FileExists("vShooterManager.cs", Application.dataPath);
        if (_shooterManager.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "public void ReloadWeapon(bool ignoreAmmo = false, bool ignoreAnim = false)";
            adding[0].add    = "public virtual void ReloadWeapon(bool ignoreAmmo = false, bool ignoreAnim = false)";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "private float currentShotTime;";
            adding[1].add    = "protected float currentShotTime;";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_shooterManager.path, newlines);
        }
    }
    void M_HitBox()
    {
        _hitBox = FileExists("vHitBox.cs", Application.dataPath);
        if (_hitBox.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "void OnTriggerEnter(Collider other)";
            adding[0].add    = "protected virtual void OnTriggerEnter(Collider other)";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "bool TriggerCondictions(Collider other)";
            adding[1].add    = "protected bool TriggerCondictions(Collider other)";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_hitBox.path, newlines);
        }
    }
    void M_ThirdPersonAnimatorCS()
    {
        _thirdPersonAnimator = FileExists("vThirdPersonAnimator.cs", Application.dataPath);
        if (_thirdPersonAnimator.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "void RandomIdle()";
            adding[0].add    = "protected virtual void RandomIdle()";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "private float randomIdleCount, randomIdle;";
            adding[1].add    = "protected float randomIdleCount, randomIdle;";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_thirdPersonAnimator.path, newlines);
        }
    }
    void M_ProjectileControl()
    {
        _projectileControl = FileExists("vProjectileControl.cs", Application.dataPath);
        if (_projectileControl.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "hitInfo.collider.gameObject.ApplyDamage(damage, damage.sender.GetComponent<vIMeleeFighter>());";
            adding[0].add    = "if (GetComponent<NetworkIdentity>().isLocalPlayer == true) { GetComponent<NetworkEvents>().Cmd_ServerSendDamage(JsonUtility.ToJson(damage)); }";
            adding[0].type   = M_FileAddtionType.NewLine;
            adding[1]        = new M_Additions();
            adding[1].target = "using System.Collections.Generic;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;

            newlines.AddRange(adding);
            ModifyFile(_projectileControl.path, newlines);
        }
    }
    void M_ThirdPersonAnimatorCS()
    {
        _thirdPersonAnimator = FileExists("vThirdPersonAnimator.cs", Application.dataPath);
        if (_thirdPersonAnimator.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "animator.SetTrigger(\"IdleRandomTrigger\");";
            adding[0].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"IdleRandomTrigger\");";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;

            newlines.AddRange(adding);
            ModifyFile(_thirdPersonAnimator.path, newlines);
        }
    }
    void M_DamageReceiver_Shooter()
    {
        _damageReceiver = FileExists("vDamageReceiver.cs", Application.dataPath + "/Invector-3rdPersonController/Shooter");
        if (_damageReceiver.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "public void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[0].add    = "public virtual void OnReceiveAttack(vDamage damage, vIMeleeFighter attacker)";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "private vIHealthController healthController;";
            adding[1].add    = "protected vIHealthController healthController;";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_damageReceiver.path, newlines);
        }
    }
    void M_ThrowUI()
    {
        _monoBehavior = FileExists("vThrowUI.cs", Application.dataPath);
        if (_monoBehavior.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]        = new M_Additions();
            adding[0].target = "private void Start()";
            adding[0].add    = "protected virtual void Start()";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "void UpdateCount()";
            adding[1].add    = "protected void UpdateCount()";
            adding[1].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_monoBehavior.path, newlines);
        }
    }
    void M_IMeleeFighter()
    {
        _imeleeFighter = FileExists("vIMeleeFighter.cs", Application.dataPath);
        if (_imeleeFighter.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[2];
            adding[0]          = new M_Additions();
            adding[0].target   = "using System.Collections;";
            adding[0].add      = "using Photon.Pun;";
            adding[0].type     = M_FileAddtionType.NewLine;
            adding[1]          = new M_Additions();
            adding[1].target   = "else receiver.ApplyDamage(damage);";
            adding[1].add      = "if (receiver.transform.root.gameObject.GetComponent<PhotonView>() && receiver.transform.root.gameObject.GetComponent<PhotonView>().IsMine == false) { receiver.transform.root.gameObject.GetComponent<PhotonView>().RPC(\"ApplyDamage\", RpcTarget.All, JsonUtility.ToJson(damage)); }";
            adding[1].nextline = "}";
            adding[1].type     = M_FileAddtionType.InsertLine;

            newlines.AddRange(adding);
            ModifyFile(_imeleeFighter.path, newlines);
        }
    }
    void M_ShooterManager()
    {
        _shooterManager = FileExists("vShooterManager.cs", Application.dataPath);
        if (_shooterManager.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[3];
            adding[0]        = new M_Additions();
            adding[0].target = "animator.SetTrigger(\"Reload\");";
            adding[0].add    = "GetComponent<NetworkAnimator>().SetTrigger(\"Reload\");";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;
            adding[2]        = new M_Additions();
            adding[2].target = "if (animator) animator.SetTrigger(\"Shoot\");";
            adding[2].add    = "if (animator) GetComponent<NetworkAnimator>().SetTrigger(\"Shoot\");";
            adding[2].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_shooterManager.path, newlines);
        }
    }
    void M_MeleeManager()
    {
        _meleeCombatInput = FileExists("vMeleeManager.cs", Application.dataPath);
        if (_meleeCombatInput.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[6];
            adding[0]        = new M_Additions();
            adding[0].target = "private int currentRecoilID;";
            adding[0].add    = "protected int currentRecoilID;";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "private bool activeRagdoll;";
            adding[1].add    = "protected bool activeRagdoll;";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "private int currentReactionID;";
            adding[2].add    = "protected int currentReactionID;";
            adding[2].type   = M_FileAddtionType.Replace;
            adding[3]        = new M_Additions();
            adding[3].target = "private string attackName;";
            adding[3].add    = "protected string attackName;";
            adding[3].type   = M_FileAddtionType.Replace;
            adding[4]        = new M_Additions();
            adding[4].target = "private bool ignoreDefense;";
            adding[4].add    = "protected bool ignoreDefense;";
            adding[4].type   = M_FileAddtionType.Replace;
            adding[5]        = new M_Additions();
            adding[5].target = "private int damageMultiplier;";
            adding[5].add    = "protected int damageMultiplier;";
            adding[5].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_meleeCombatInput.path, newlines);
        }
    }
    void M_MonoBehavior()
    {
        _monoBehavior = FileExists("vMonoBehaviour.cs", Application.dataPath);
        if (_monoBehavior.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[3];
            adding[0]        = new M_Additions();
            adding[0].target = "public  class vMonoBehaviour : MonoBehaviour";
            adding[0].add    = "public  class vMonoBehaviour : NetworkBehaviour";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "using UnityEngine;";
            adding[1].add    = "using UnityEngine.Networking;";
            adding[1].type   = M_FileAddtionType.NewLine;
            adding[2]        = new M_Additions();
            adding[2].target = "public class vMonoBehaviour : MonoBehaviour";
            adding[2].add    = "public class vMonoBehaviour : NetworkBehaviour";
            adding[2].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_monoBehavior.path, newlines);
        }
    }
    void M_LadderAction()
    {
        _ladderAction = FileExists("vLadderAction.cs", Application.dataPath);
        if (_ladderAction.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[3];
            adding[0]        = new M_Additions();
            adding[0].target = "void TriggerEnterLadder()";
            adding[0].add    = "protected virtual void TriggerEnterLadder()";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "void ExitLadderInput()";
            adding[1].add    = "protected virtual void ExitLadderInput()";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "void ResetPlayerSettings()";
            adding[2].add    = "protected virtual void ResetPlayerSettings()";
            adding[2].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_ladderAction.path, newlines);
        }
    }
    void M_ItemManager()
    {
        _itemManager = FileExists("vItemManager.cs", Application.dataPath);
        if (_itemManager.exists == true)
        {
            List <M_Additions> newlines = new List <M_Additions>();
            M_Additions[]      adding   = new M_Additions[3];
            adding[0]        = new M_Additions();
            adding[0].target = "private float equipTimer;";
            adding[0].add    = "protected float equipTimer;";
            adding[0].type   = M_FileAddtionType.Replace;
            adding[1]        = new M_Additions();
            adding[1].target = "IEnumerator EquipItemRoutine(EquipPoint equipPoint, vItem item)";
            adding[1].add    = "protected virtual IEnumerator EquipItemRoutine(EquipPoint equipPoint, vItem item)";
            adding[1].type   = M_FileAddtionType.Replace;
            adding[2]        = new M_Additions();
            adding[2].target = "IEnumerator UnequipItemRoutine(EquipPoint equipPoint, vItem item)";
            adding[2].add    = "protected virtual IEnumerator UnequipItemRoutine(EquipPoint equipPoint, vItem item)";
            adding[2].type   = M_FileAddtionType.Replace;

            newlines.AddRange(adding);
            ModifyFile(_itemManager.path, newlines);
        }
    }