Esempio n. 1
0
        /// <summary>
        /// Constructors a new sprite.
        /// </summary>        
        public MiniBoss(ContentManager p_Content, string p_XMLFile, Vector2 p_InitialPosition)
        {
            Sprite = new Sprite(p_Content, p_XMLFile);
            Sprite.Scale = 1.0f;
            State = new EnemyIdleState(this);
            AnimationReversed = true;
            Direction = GV.LEFT;
            Velocity = new Vector2(0, 0);
            PositionInTile(p_InitialPosition);
            IsAlive = true;
            Health = 100;
            IsOnGround = false;

            StateMachine = new StateMachine(this, new EnemyIdleState(this));

            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "collision", "PatrolState");
            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "isHit", "KnockedDownState");

            StateMachine.AddState("KismetDataTypes.PatrolState", "collision", "PursueState");
            StateMachine.AddState("KismetDataTypes.PatrolState", "isHit", "KnockedDownState");

            StateMachine.AddState("KismetDataTypes.PursueState", "collision", "AttackState");
            StateMachine.AddState("KismetDataTypes.PursueState", "noCollision", "PatrolState");
            StateMachine.AddState("KismetDataTypes.PursueState", "isHit", "KnockedDownState");

            StateMachine.AddState("KismetDataTypes.KnockedDownState", "", "TeleportState");
            StateMachine.AddState("KismetDataTypes.TeleportState", "", "EnemyIdleState");

            StateMachine.AddState("KismetDataTypes.AttackState", "", "PatrolState");
            StateMachine.AddState("KismetDataTypes.AttackState", "isHit", "KnockedDownState");
        }
Esempio n. 2
0
        /// <summary>
        /// Constructors a new sprite.
        /// </summary>        
        public DemonArcher(ContentManager p_Content, string p_XMLFile, Vector2 p_InitialPosition)
        {
            Sprite = new Sprite(p_Content, p_XMLFile);
            Sprite.Scale = 1.0f;
            State = new EnemyIdleState(this);
            Direction = GV.RIGHT;
            Velocity = new Vector2(0, 0);

            Position = p_InitialPosition;
            IsAlive = true;
            Health = 50;

            IsOnGround = false;

            StateMachine = new StateMachine(this, new EnemyIdleState(this));

            StateMachine.AddState("KismetDataTypes.PatrolState", "insight", "AttackState");
            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "collision", "AttackState");
            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "isHit", "KnockedDownState");

            StateMachine.AddState("KismetDataTypes.PatrolState", "collision", "AttackState");
            StateMachine.AddState("KismetDataTypes.PatrolState", "isHit", "KnockedDownState");
            StateMachine.AddState("KismetDataTypes.PatrolState", "jump", "AttackState");

            StateMachine.AddState("KismetDataTypes.PursueState", "collision", "AttackState");
            StateMachine.AddState("KismetDataTypes.PursueState", "noCollision", "EnemyIdleState");
            StateMachine.AddState("KismetDataTypes.PursueState", "isHit", "KnockedDownState");

            StateMachine.AddState("KismetDataTypes.KnockedDownState", "", "EnemyIdleState");

            StateMachine.AddState("KismetDataTypes.AttackState", "", "EnemyIdleState");
            StateMachine.AddState("KismetDataTypes.AttackState", "isHit", "KnockedDownState");
        }
Esempio n. 3
0
        /// <summary>
        /// Constructors a new sprite.
        /// </summary>        
        public FireMage(ContentManager p_Content, string p_XMLFile, Vector2 p_InitialPosition)
        {
            Sprite = new Sprite(p_Content, p_XMLFile);
            Sprite.Scale = 1.0f;
            State = new EnemyIdleState(this);
            Direction = GV.LEFT;
            Velocity = new Vector2(0, 0);

            Position = p_InitialPosition;
            IsAlive = true;
            IsOnGround = false;

            StateMachine = new StateMachine(this, new EnemyIdleState(this));

            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "collision", "AttackState");
            StateMachine.AddState("KismetDataTypes.EnemyIdleState", "isHit", "EnemyIdleState");
            StateMachine.AddState("KismetDataTypes.AttackState", "collision", "EnemyIdleState");
            StateMachine.AddState("KismetDataTypes.AttackState", "isHit", "EnemyIdleState");
            StateMachine.AddState("KismetDataTypes.AttackState", "", "EnemyIdleState");
        }