Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Meele Script

$
0
0
I'm looking for a good way to write a meele script. For now I have something like that
Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MyHand : MonoBehaviour {
  5.  
  6.     float Distance;
  7.    
  8.     void Update () {
  9.         if (Input.GetButton("Fire1")) {
  10.             audio.Play();
  11.             Vector3 forward = transform.TransformDirection (Vector3.forward);
  12.             Distance = hit.distance;
  13.             if (Distance <= 2) {...
Meele Script

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>