示例#1
0
文件: Glowing.cs 项目: sergik/Cardio
        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;
        }
示例#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));
        }