Assets/Scripts/Bird.cs(21,8): error CS1525: Unexpected symbol `t' error en t.Elapsed += T_Elapsed;
using UnityEngine;
using System.Collections;
using System.Timers;
public class Bird : MonoBehaviour {
// Movement speed
public float speed = 1;
// Flap force
public float force = 100;
public double Interval = 10000;
private Timer t;
// Use this for initialization
void Start () {
// Fly towards the right
GetComponent<Rigidbody2D>().velocity = Vector2.right * speed;
t = new Timer(Interval)
t.Elapsed += T_Elapsed;
t.Start();
}
// Update is called once per frame
void Update () {
// Flap
if (Input.GetKeyDown(KeyCode.Space))
GetComponent<Rigidbody2D>().AddForce(Vector2.up * force);
}
void OnCollisionEnter2D(Collision2D coll) {
// Restart
t.Stop();
Application.LoadLevel(Application.loadedLevel);
}
private static void T_Elapsed(object sender, ElapsedEventArgs e)
{
t.Stop();
///
/// aqui pones el codigo para mostrar que gano
///
}
}