Ejemplo n.º 1
0
        public Snake() : base(QuickGameScene.Current, Textures.SnakeTexture)
        {
            Position.SetWidth(8, GameEngine.AnchorOrigin.Left);
            Position.SetHeight(16, GameEngine.AnchorOrigin.Top);

            Animations.Add(AnimationKeys.Walk, this, TextureFlipBehavior.FlipWhenFacingLeft, 0, 1, 2, 3);

            var behavior = new EnemyBehavior <Snake>(this, EnemyBehaviorFlags.MovesMore | EnemyBehaviorFlags.HasGravity);

            behavior.Reactions.WalkingOffLedge = ObstacleReaction.TurnAround;

            behavior.Initialize();


            DamageHandler = new EnemyDamageHandler <Snake>(2, this);
        }