Example #1
0
    public void StatusChange(Gun_Status status)
    {
        _autoType  = status.Mode_Type;
        ShootPos   = status.ShootPos;
        ZoomCamera = status.ZoomCamera;

        Standard_Accuracy = status.Accuracy;
        Accuracy          = status.Accuracy;
        None_Aim_Acc      = Accuracy;

        Gun_Power = status.Gun_Power;

        Rate_Of_Fire = status.Rate_Of_Fire;
        Recoil_value = status.Recoil_value;
        ReloadTime   = status.ReloadTime;
        if (On_Reload_Delay)
        {
            StopCoroutine("Weapon_Reload");
            On_Reload_Delay    = false;
            Reload_Gauge.value = 1;
        }
        Magazine = status.Magazine;
        Ammo     = Magazine;

        AmmoText.text = Ammo.ToString() + " / " + Magazine.ToString();
    }
Example #2
0
    void Gun_Ready(GameObject New_Gun)
    {
        Gun_Status GS = New_Gun.GetComponent <Gun_Status>();

        New_Gun.transform.parent           = Gun_Pos;
        New_Gun.transform.position         = Gun_Pos.position;
        New_Gun.transform.localEulerAngles = GS.StandardRotation;
    }
Example #3
0
    void Awake()
    {
        shooting            = GetComponent <Shooting>();
        PickUp_Text.enabled = false;

        if (EquipGun)
        {
            Gun_Status gunStatus = EquipGun.GetComponent <Gun_Status>();
            gunStatus.ZoomCamera.targetDisplay = 0;
            shooting.StatusChange(gunStatus);
            Target = gunStatus.ShootPos;
            EquipGun.GetComponent <BoxCollider>().enabled  = false;
            EquipGun.GetComponent <Rigidbody>().useGravity = false;
        }
    }
Example #4
0
    void Get_Gun(GameObject New_Gun)
    {
        Gun_Status GS = New_Gun.GetComponent <Gun_Status>();

        Destroy(EquipGun.gameObject);

        GS.ZoomCamera.enabled       = false;
        GS.ZoomCamera.targetDisplay = 0;

        Target = GS.ShootPos;
        New_Gun.GetComponent <BoxCollider>().enabled  = false;
        New_Gun.GetComponent <Rigidbody>().useGravity = false;

        Gun_Ready(New_Gun);
        Gun_Change(New_Gun);
    }