Click here to Skip to main content
15,889,651 members
Home / Discussions / C#
   

C#

 
QuestionHow do you build a 1 click application that will alow you to change users using a smart card Pin
Steven Richardson21-May-14 10:37
Steven Richardson21-May-14 10:37 
AnswerRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Mycroft Holmes21-May-14 19:32
professionalMycroft Holmes21-May-14 19:32 
SuggestionRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan21-May-14 21:59
mveRichard MacCutchan21-May-14 21:59 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Steven Richardson22-May-14 5:25
Steven Richardson22-May-14 5:25 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan22-May-14 6:28
mveRichard MacCutchan22-May-14 6:28 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Steven Richardson22-May-14 7:19
Steven Richardson22-May-14 7:19 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan22-May-14 7:21
mveRichard MacCutchan22-May-14 7:21 
Questionunity 2D C# coding problem Pin
Sepehr M21-May-14 9:00
Sepehr M21-May-14 9:00 
hi there i have a problem with my 2d character again...i fixed my previous problems but the new problem is that,that i cant make my character punchin...he walks,he jumps pretty well but i'm in some problem with punchin movement or anything like this...i made a punch animation and i made a transation to the idle and from idle to puch in the animator window...and also i made a trigger parameter but my code dosent work...may be the code i wrote is completley worng...if thats wrong please tell me what shout id do? thanks

C#
using UnityEngine;
using System.Collections;
 
public class ScrorpionControllerScript : MonoBehaviour 
{
	public float maxSpeed = 10f;
	bool facingRight = true;
 
	Animator anim;
 
	bool grounded = false;
	public Transform groundCheck;
	float groundRadius = 0.2f;
	public LayerMask whatIsGround;
	float jumpTime, jumpDelay = 0.2f;
	bool jumped;
	float punchTime, punchDelay = .5f;
	bool punch;
 

	// Use this for initialization
	void Start () 
	{
		anim = GetComponent<Animator> ();
	}
	
	// Update is called once per frame
	void FixedUpdate () 
	{
		grounded = Physics2D.OverlapCircle (groundCheck.position, groundRadius, whatIsGround);
		anim.SetBool ("Ground", grounded);
 
		anim.SetFloat ("vSpeed", rigidbody2D.velocity.y);
 
		anim.SetBool ("Ground", grounded);
 
		float move = Input.GetAxis ("Horizontal");
 
		anim.SetFloat ("wa", Mathf.Abs (move));
 
			rigidbody2D.velocity = new Vector2(move * maxSpeed, rigidbody2D.velocity.y);
 
		    if(move > 0 &&! facingRight)
			Flip ();
		    else if (move < 0 && facingRight)
			Flip ();
	}
 
	void Update()
	{
		if(Input.GetKeyDown (KeyCode.Space) && grounded)
		{
			rigidbody2D.AddForce(transform.up * 275f);
			jumpTime = jumpDelay;
			anim.SetTrigger("Jump");
			jumped = true;
		}
		jumpTime -= Time.deltaTime;
		if (jumpTime <= 0 && grounded && jumped) 
		{
	    	anim.SetTrigger ("Land");
			jumped = false;
		}
		if (Input.GetKeyDown (KeyCode.R));
		{
			punchTime = punchDelay;
			anim.SetTrigger("punch");
			punch = true;
		}
	}
 
	void Flip()
	{
		facingRight = !facingRight;
		Vector3 theScale = transform.localScale;
		theScale.x *= -1;
		transform.localScale = theScale;
	}
}

AnswerRe: unity 2D C# coding problem Pin
OriginalGriff21-May-14 9:13
mveOriginalGriff21-May-14 9:13 
QuestionPolymorphism In C# Pin
Member 1059122721-May-14 6:14
Member 1059122721-May-14 6:14 
AnswerRe: Polymorphism In C# Pin
OriginalGriff21-May-14 6:23
mveOriginalGriff21-May-14 6:23 
GeneralRe: Polymorphism In C# Pin
Member 1059122721-May-14 7:08
Member 1059122721-May-14 7:08 
GeneralRe: Polymorphism In C# Pin
OriginalGriff21-May-14 8:02
mveOriginalGriff21-May-14 8:02 
AnswerRe: Polymorphism In C# Pin
Eddy Vluggen21-May-14 9:40
professionalEddy Vluggen21-May-14 9:40 
QuestionMVC Pin
Pramod Singh (C)21-May-14 2:34
professionalPramod Singh (C)21-May-14 2:34 
AnswerRe: MVC Pin
Kornfeld Eliyahu Peter21-May-14 2:50
professionalKornfeld Eliyahu Peter21-May-14 2:50 
GeneralRe: MVC Pin
Pramod Singh (C)21-May-14 18:59
professionalPramod Singh (C)21-May-14 18:59 
AnswerRe: MVC Pin
Keith Barrow21-May-14 2:58
professionalKeith Barrow21-May-14 2:58 
GeneralRe: MVC Pin
Pramod Singh (C)21-May-14 18:57
professionalPramod Singh (C)21-May-14 18:57 
QuestionC# Pin
Pramod Singh (C)21-May-14 2:04
professionalPramod Singh (C)21-May-14 2:04 
AnswerRe: C# Pin
V.21-May-14 2:24
professionalV.21-May-14 2:24 
AnswerRe: C# PinPopular
Pete O'Hanlon21-May-14 2:29
mvePete O'Hanlon21-May-14 2:29 
GeneralRe: C# Pin
Richard MacCutchan21-May-14 22:04
mveRichard MacCutchan21-May-14 22:04 
GeneralRe: C# Pin
Pete O'Hanlon21-May-14 23:14
mvePete O'Hanlon21-May-14 23:14 
Questionsaving necessery point from a curve Pin
maysamfth20-May-14 18:56
maysamfth20-May-14 18:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.