Unit.OnMouseDown C# (CSharp) Method

OnMouseDown() protected method

protected OnMouseDown ( ) : void
return void
    protected virtual void OnMouseDown()
    {
        if (owner && owner.human && !moving && !aiming && !attacking && idleSound && !audio.isPlaying)
        {
            audio.PlayOneShot (idleSound);
        }
    }