Exemple #1
0
        public Minion(float posX, float posY, float velX, float velY)
        {
            cComponent = new ComponentCollidable(this, 8, 8, Collision);
            positionC  = new ComponentPosition(this, posX, posY);
            velocityC  = new ComponentVelocity(this, velX, velY);

            components.Add(cComponent);
            components.Add(positionC);
            components.Add(velocityC);

            color = new Color(ECSGame.rDom.Next(0, 255), ECSGame.rDom.Next(100, 255), ECSGame.rDom.Next(100, 255));
        }
Exemple #2
0
 public void UpdatePosition(ComponentPosition pos, ComponentCollidable coll)
 {
     coll.UpdatePosition(pos);
 }