using UnityEngine;
using System.Collections;
using System.Timers;
public class Random_Powerup_Generation : MonoBehaviour
{
// Use this for initialization
void Start ()
{
//randomize timer to int between 15000 and 45000
int powerUpInterval;
Random rand = new Random();
powerupInterval = rand.Next(15000,45000);
//create timer
PowerupTimer = new Timer(powerupInterval);
Debug.Log(powerUpInterval);
//create the event for the timer
PowerupTimer.Elapsed += new ElapsedEventHandler(CreateNewPowerup)
//start timer
PowerupTimer.Start();
//Make sure it resets
PowerupTimer.AutoReset = true;
}
I get an error CS1525: Unexpected symbol ‘PowerupTimer’ at line 21 here. It looks correct o me, however I have only written for asp.NET web forms and MVVC using c# so I am not sure. Am I missing something here?