Esempio n. 1
0
        public RyanEyesClosed()
        {
            Transform
            .Create(this)
            .SetPosition(DEFAULT_POSITION)
            .SetZ(2)
            .SetAbsolute(true);

            Sprite
            .Create(this)
            .SetImage(content.rooms.office.ryaneyes, 2)
            .SetFrame(1);

            RandomCountdown
            .Create(this)
            .SetDuration(7)
            .SetMinUpdates(300)
            .SetMaxUpdates(500);

            DrawOrder = Ryan.PRIORITY + 1;
        }
Esempio n. 2
0
        public Ryan(Inventory inventory)
        {
            Inventory = inventory;

            CameraLocked
            .Create(this);

            Transform
            .Create(this)
            .SetPosition(350, 250)
            .SetSpeed(120)
            .SetOrientation(-Vector2.UnitY)
            .SetUpdateZWithPosition(true)
            .SetScale(1.0f);

            Sprite
            .Create(this)
            .SetEnableNormalMap(false)
            .SetImage(content.characters.ryan.sprite_blood, 13, 8, 0);

            SpriteTransformAnimation
            .Create(this)
            .SetSetFrameFn(SetFrame);

            SpriteCustomAnimation
            .Create(this)
            .SetGetFramesAction(GetCustomAnimationFrames);

            SpriteData
            .Create(this)
            .SetOrientationFlip(false)
            .SetOffset(-76, -143);

            Text
            .Create(this)
            .SetFont(content.fonts.pixeloperator_outline_BMF)
            .SetWidth(300)
            .SetConstrain(true)
            .SetConstrainingRectangle(new Rectangle(0, 0, Game.VIRTUAL_WIDTH, Game.VIRTUAL_HEIGHT))
            .SetAlign(Alignment.Bottom);

            Navigation
            .Create(this)
            .SetApplyScale(true)
            .SetApplyColoring(true)
            .SetRestrictPosition(true)
            .SetScale(1.75f);

            Scripts
            .Create(this);

            Lightning
            .Create(this)
            .SetLightPosition(new Vector3(new Vector2(51, 61), 0))
            .SetLightColor(new Vector3(1.25f, 0.6f, 0.6f));

            BloodDropEmitter
            .Create(this);

            Score
            .Create(this);

            RandomCountdown
            .Create(this)
            .SetDuration(7)
            .SetMinUpdates(300)
            .SetMaxUpdates(500);
        }