Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

SahamarxNew

Member
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    2

SahamarxNew last won the day on June 11 2018

SahamarxNew had the most liked content!

Community Reputation

8 Neutral

About SahamarxNew

  • Rank
    Member
  • Birthday 06/17/1996

Profile Information

  • Gender
    Male
  • Location:
    Россия

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hi all update of my kit for training. Unity3d 2018+ ---Reload randome system https://yadi.sk/d/_Spoy_SC7PP7lQ Скачать видео
  2. I'll upload a sample project soon
  3. using UnityEngine; using System.Collections; public class WeaponManager : MonoBehaviour { public RunChek rc; private int bullet_max_inmagazine; // максимальное кол-во патронов в магазине (устанавливается само) public int bullets_inmagazine; // Кол-во патронов в магазине public int bullets; // Кол-во патронов public bool readyshoot; //Звуки выстрелов,перезарядки и т.д [Space(30)] public AudioSource audsource; public AudioClip sshoot; public AudioClip snobullets; public AudioClip sdraw; public AudioClip areload; public RandomReload ReloadEff; public Animation animations; public Transform crosshair; public Transform camera2; [Range(0,9999)] public float distance; public Transform dirt; void Start() { Draw(); animations = GetComponent<Animation>(); bullet_max_inmagazine = bullets_inmagazine; } void Update() { if (rc.RunNow) { animations.Play("run"); } else { animations.PlayQueued("idle", QueueMode.CompleteOthers); } if (animations.IsPlaying("idle")) { readyshoot = true; crosshair.gameObject.SetActive(true); } if (Input.GetMouseButtonDown(0)) { Shoot(); } if (Input.GetKeyDown(KeyCode.R)) { Reload(); } } public void Reload() { if (bullets_inmagazine >= bullet_max_inmagazine || bullets <= 0) { } else { crosshair.gameObject.SetActive(false); ReloadEff.enabled = (true); audsource.PlayOneShot(areload); animations.Play("reload"); { readyshoot = false; ReloadEff.enabled = (false); } animations.PlayQueued("idle", QueueMode.CompleteOthers); bullets -= bullet_max_inmagazine - bullets_inmagazine; bullets_inmagazine += bullet_max_inmagazine - bullets_inmagazine; } } public void NoBullets() { audsource.PlayOneShot(snobullets); bullets_inmagazine = 0; } public void Shoot() { if (bullets_inmagazine <= 0) { NoBullets(); } else { if (readyshoot) { Vector3 direct = transform.TransformDirection(Vector3.forward); RaycastHit hit; if (Physics.Raycast(camera2.position, direct, out hit, distance )) { if(hit.collider.tag == "Enemy") { Destroy(hit.collider.gameObject); } } bullets_inmagazine = bullets_inmagazine - 1; audsource.PlayOneShot(sshoot); animations.Play("shoot"); animations.PlayQueued("idle", QueueMode.CompleteOthers); } } } public void Draw() { audsource.PlayOneShot(sdraw); animations.Play("draw"); animations.PlayQueued("idle", QueueMode.CompleteOthers); } }
  4. using UnityEngine; using System.Collections; public class RandomReload : MonoBehaviour { public AudioClip[] Sounds; // Use this for initialization void OnEnable () { gameObject.GetComponent<AudioSource>().clip = Sounds[Random.Range(0, Sounds.Length)]; gameObject.GetComponent<AudioSource> ().Stop (); gameObject.GetComponent<AudioSource> ().Play (); } // Update is called once per frame void Update () { } }
  5. Helloy ! My lesson Unity3d Random Reload Weapon Скачать видео
  6. Informations Unity Engine (Version 2017+ Low Poly Fantasy RPG Environment Intuitive package and easy-to-customize Project Documentation Features Unity’s new UI system with Modern Interface Pack Player, Monsters, NPCs Equipment System based on transforms and prefabs Health, thirst and hunger system Point Click, WSAD and Joystick/Controller movement via Navigation Xbox 360 joystick is automatically identified when connecting switching inputs RPG Camera with Zoom, Rotation and Joystick/Controller Support Animations via Mecanim Low Poly FREE 3D Models Minimap Inventory, Loot and Gold System Death and Respawning Carefully crafted C# Code Tottaly FREE to customize Levels and Attributes Day / Night System Download: https://unitylist.com/api/get?id=16426&amp;download
  7. I can update it a little, if it will be useful to someone
  8. Я пытаюсь сделать интересный проект, нет времени.- Как поживаете?
  9. Я скоро начну серию уроков . Разработка мобильной игры с нуля.I develop tutorial mobile game .
  10. Не слишком большой.
  11. https://github.com/Doreamonsky/PanzerWar/archive/master.zip
×
×
  • Create New...