Пример #1
0
    protected override void executeStart()
    {
        Players.Instance.GetLocal().GetComponent <AudioSource>().PlayOneShot(ReloadSound);
        UserShooting userShootingScript = Players.Instance.GetLocal().GetComponent <UserShooting>();

        userShootingScript.AmmoCount = userShootingScript.ClipMaxSize;
    }
Пример #2
0
    protected override void executeStart()
    {
        UserShooting userShootingScript = Players.Instance.GetLocal().GetComponent <UserShooting>();

        float originalErrorX = userShootingScript.ShootXDirError;
        float originalErrorY = userShootingScript.ShootYDirError;

        userShootingScript.ShootXDirError = ErrorX;
        userShootingScript.ShootYDirError = ErrorY;

        int fragments = FragmentsPerAmmoUnit * Players.Instance.GetLocal().AmmoData.AmmoCount;

        for (int i = 0; i < fragments; i++)
        {
            userShootingScript.FireSingle(UserShooting.AmmoType.FRAGMENT);
        }

        userShootingScript.ShootXDirError = originalErrorX;
        userShootingScript.ShootYDirError = originalErrorY;

        Players.Instance.GetLocal().AmmoData.AmmoCount = 0;
    }