Example #1
0
        public static Glowing FromMetadata(CloseCombatEnemyMetadata metadata, ContentManager contentManager)
        {
            var glowing = new Glowing();
            FillWithMetadata(glowing, metadata, contentManager);

            glowing.Content.AddAnimationRule("Default", () => glowing.IsAlive);
            glowing.Content.AddAnimationRule("Blow", () => !glowing.IsAlive);

            return glowing;
        }
Example #2
0
        public static void FillWithMetadata(CloseCombatEnemy enemy, CloseCombatEnemyMetadata metadata, ContentManager contentManager)
        {
            enemy.Acceleration = metadata.Acceleration;
            enemy.AttackDamage = metadata.AttackDamage;
            enemy.AttackRange = metadata.AttackRange;
            enemy.MaxVelocity = metadata.MaxVelocity;

            ObstacleGameObject.FillWithMetadata(enemy, metadata, contentManager);

            enemy.AddScript(new CloseCombatEnemyAttackScript(enemy));
        }