Example #1
0
        public SurvivalViewController()
        {
            DoubleBuffered = true;
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);

            this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);

            OOEEngine.Shared.FPS = 30;

            playerContext.maxHealth   = 5;
            playerContext.healthPoint = playerContext.maxHealth;


            player.SetDefaultOrbStyle();
            player.frame.size = new CGSize(50, 50);



            playerContext.OnHealthChange = OnPlayerHealthChange;
            playerContext.OnDeath        = OnPlayerDeath;

            powerupSpawnTimer          = new Timer();
            powerupSpawnTimer.Interval = 15 * 1000;
            powerupSpawnTimer.Tick    += PowerUpSpawnTick;
        }