Cyclyc.Framework.Challenge.EnemyCreated C# (CSharp) Method

EnemyCreated() public method

public EnemyCreated ( CycEnemy enemy ) : void
enemy CycEnemy
return void
        public void EnemyCreated(CycEnemy enemy)
        {
            enemyCount += enemy.Difficulty;
        }

Usage Example

Beispiel #1
0
 public virtual void Reset(Challenge c, string img, int fc, CollisionStyle col, bool left, int xp, int yp, int w, int h, int diff)
 {
     challenge = c;
     Difficulty = diff;
     collisionStyle = col;
     frameCount = fc;
     assetName = img;
     LoadContent();
     Play("default");
     bounds = new Rectangle(0, 0, w, h);
     int x = 0;
     if (left)
     {
         x = xp - SpriteWidth;
         leftToRight = true;
     }
     else
     {
         x = xp;
         leftToRight = false;
     }
     startPosition = new Vector2(x, yp);
     position = startPosition;
     velocity = new Vector2(0, 0);
     alive = true;
     visible = true;
     VisualWidth = w;
     VisualHeight = h;
     c.EnemyCreated(this);
 }