General melee weapon behaviour. First thing you need to check is hit event. Use animation events or check user input. Second thing is to resolve impacts to other objects (enemies, environment). Use collisions or raycasts.
Namespace: Assets.HeroEditor.Common.CharacterScripts Assembly: Assembly-CSharp (in Assembly-CSharp.dll)
Public Class MeleeWeapon
Inherits MonoBehaviour
This language is not supported or no code example is available.
public class MeleeWeapon : MonoBehaviour
This language is not supported or no code example is available.
public ref class MeleeWeapon : public MonoBehaviour^
This language is not supported or no code example is available.
Name | Description | |
---|---|---|
![]() |
animation |
Obsolete.
The Animation attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
audio |
Obsolete.
The AudioSource attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
camera |
Obsolete.
The Camera attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
collider |
Obsolete.
The Collider attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
collider2D |
Obsolete.
The Collider2D component attached to the object. (inherited from Component). |
![]() |
constantForce |
Obsolete.
The ConstantForce attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
enabled |
Enabled Behaviours are Updated, disabled Behaviours are not. (inherited from Behaviour). |
![]() |
gameObject |
The game object this component is attached to. A component is always attached to a game object. (inherited from Component). |
![]() |
guiElement | Obsolete. (inherited from Component). |
![]() |
guiText |
Obsolete.
The GUIText attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
guiTexture |
Obsolete.
The GUITexture attached to this GameObject (Read Only). (null if there is none attached). (inherited from Component). |
![]() |
hideFlags |
Should the object be hidden, saved with the scene or modifiable by the user? (inherited from Object). |
![]() |
hingeJoint |
Obsolete.
The HingeJoint attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
isActiveAndEnabled |
Has the Behaviour had enabled called. (inherited from Behaviour). |
![]() |
light |
Obsolete.
The Light attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
name |
The name of the object. (inherited from Object). |
![]() |
networkView |
Obsolete.
The NetworkView attached to this GameObject (Read Only). (null if there is none attached). (inherited from Component). |
![]() |
particleEmitter |
Obsolete.
The ParticleEmitter attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
particleSystem |
Obsolete.
The ParticleSystem attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
renderer |
Obsolete.
The Renderer attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
rigidbody |
Obsolete.
The Rigidbody attached to this GameObject. (Null if there is none attached). (inherited from Component). |
![]() |
rigidbody2D |
Obsolete.
The Rigidbody2D that is attached to the Component's GameObject. (inherited from Component). |
![]() |
runInEditMode |
Allow a specific instance of a MonoBehaviour to run in edit mode (only available in the editor). (inherited from MonoBehaviour). |
![]() |
tag |
The tag of this game object. (inherited from Component). |
![]() |
transform |
The Transform attached to this GameObject. (inherited from Component). |
![]() |
useGUILayout |
Disabling this lets you skip the GUI layout phase. (inherited from MonoBehaviour). |
Name | Description | |
---|---|---|
![]() |
BroadcastMessage(String, Object) |
Calls the method named methodName on every MonoBehaviour in this game object or any of its children. (inherited from Component). |
![]() |
BroadcastMessage(String) |
Calls the method named methodName on every MonoBehaviour in this game object or any of its children. (inherited from Component). |
![]() |
BroadcastMessage(String, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object or any of its children. (inherited from Component). |
![]() |
BroadcastMessage(String, Object, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object or any of its children. (inherited from Component). |
![]() |
CancelInvoke |
Cancels all Invoke calls on this MonoBehaviour. (inherited from MonoBehaviour). |
![]() |
CancelInvoke(String) |
Cancels all Invoke calls with name methodName on this behaviour. (inherited from MonoBehaviour). |
![]() |
CompareTag(String) |
Is this game object tagged with tag ? (inherited from Component). |
![]() |
Equals(Object) | (inherited from Object). |
![]() |
GetComponent<T> | (inherited from Component). |
![]() |
GetComponent(String) |
Returns the component with name type if the game object has one attached, null if it doesn't. (inherited from Component). |
![]() |
GetComponent(Type) |
Returns the component of Type type if the game object has one attached, null if it doesn't. (inherited from Component). |
![]() |
GetComponentInChildren(Type) |
Returns the component of Type type in the GameObject or any of its children using depth first search. (inherited from Component). |
![]() |
GetComponentInChildren<T> | (inherited from Component). |
![]() |
GetComponentInChildren<T>(Boolean) | (inherited from Component). |
![]() |
GetComponentInChildren(Type, Boolean) | (inherited from Component). |
![]() |
GetComponentInParent(Type) |
Returns the component of Type type in the GameObject or any of its parents. (inherited from Component). |
![]() |
GetComponentInParent<T> | (inherited from Component). |
![]() |
GetComponents<T>(List<T>) | (inherited from Component). |
![]() |
GetComponents(Type, List<Component>) | (inherited from Component). |
![]() |
GetComponents(Type) |
Returns all components of Type type in the GameObject. (inherited from Component). |
![]() |
GetComponents<T> | (inherited from Component). |
![]() |
GetComponentsInChildren(Type, Boolean) |
Returns all components of Type type in the GameObject or any of its children. (inherited from Component). |
![]() |
GetComponentsInChildren<T>(Boolean) | (inherited from Component). |
![]() |
GetComponentsInChildren<T>(Boolean, List<T>) | (inherited from Component). |
![]() |
GetComponentsInChildren<T>(List<T>) | (inherited from Component). |
![]() |
GetComponentsInChildren<T> | (inherited from Component). |
![]() |
GetComponentsInChildren(Type) |
Returns all components of Type type in the GameObject or any of its children. (inherited from Component). |
![]() |
GetComponentsInParent<T> | (inherited from Component). |
![]() |
GetComponentsInParent<T>(Boolean) | (inherited from Component). |
![]() |
GetComponentsInParent(Type, Boolean) |
Returns all components of Type type in the GameObject or any of its parents. (inherited from Component). |
![]() |
GetComponentsInParent(Type) | (inherited from Component). |
![]() |
GetComponentsInParent<T>(Boolean, List<T>) | (inherited from Component). |
![]() |
GetHashCode | (inherited from Object). |
![]() |
GetInstanceID |
Returns the instance id of the object. (inherited from Object). |
![]() |
GetType | (inherited from Object). |
![]() |
Invoke(String, Single) |
Invokes the method methodName in time seconds. (inherited from MonoBehaviour). |
![]() |
InvokeRepeating(String, Single, Single) |
Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds. (inherited from MonoBehaviour). |
![]() |
IsInvoking(String) |
Is any invoke on methodName pending? (inherited from MonoBehaviour). |
![]() |
IsInvoking |
Is any invoke pending on this MonoBehaviour? (inherited from MonoBehaviour). |
![]() |
OnDestroy() | |
![]() |
SendMessage(String, Object) |
Calls the method named methodName on every MonoBehaviour in this game object. (inherited from Component). |
![]() |
SendMessage(String) |
Calls the method named methodName on every MonoBehaviour in this game object. (inherited from Component). |
![]() |
SendMessage(String, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object. (inherited from Component). |
![]() |
SendMessage(String, Object, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object. (inherited from Component). |
![]() |
SendMessageUpwards(String, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. (inherited from Component). |
![]() |
SendMessageUpwards(String, Object) |
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. (inherited from Component). |
![]() |
SendMessageUpwards(String, Object, SendMessageOptions) |
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. (inherited from Component). |
![]() |
SendMessageUpwards(String) |
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. (inherited from Component). |
![]() |
Start() | Listen animation events to determine hit moments. |
![]() |
StartCoroutine(IEnumerator) |
Starts a coroutine. (inherited from MonoBehaviour). |
![]() |
StartCoroutine(String, Object) |
Starts a coroutine named methodName. (inherited from MonoBehaviour). |
![]() |
StartCoroutine(String) |
Starts a coroutine named methodName. (inherited from MonoBehaviour). |
![]() |
StartCoroutine_Auto(IEnumerator) | Obsolete. (inherited from MonoBehaviour). |
![]() |
StopAllCoroutines |
Stops all coroutines running on this behaviour. (inherited from MonoBehaviour). |
![]() |
StopCoroutine(IEnumerator) |
Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. (inherited from MonoBehaviour). |
![]() |
StopCoroutine(String) |
Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. (inherited from MonoBehaviour). |
![]() |
StopCoroutine(Coroutine) |
Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. (inherited from MonoBehaviour). |
![]() |
ToString |
Returns the name of the game object. (inherited from Object). |
Name | Description | |
---|---|---|
![]() |
AnimationEvents | |
![]() |
Edge |