예제 #1
0
            public Nut(Vector2 position)
            {
                Sprite
                .Create(this)
                .SetImage(content.rooms.basement.nut);

                HotspotSprite
                .Create(this)
                .SetCaption(Basement_Res.nut)
                .SetPixelPerfect(true);

                Interaction
                .Create(this)
                .SetDirection(Directions8.Down)
                .SetPosition(position)
                .SetGetInteractionsFn(GetInteractions);

                Transform
                .Create(this)
                .SetPosition(position)
                .SetZ(position.Y);

                SpriteData
                .Create(this)
                .SetOffset(-3, -2);

                CameraLocked
                .Create(this)
                .SetEnabled(false);
            }
예제 #2
0
        public Ego()
        {
            CameraLocked
            .Create(this);

            Transform
            .Create(this)
            .SetPosition(350, 250)
            .SetSpeed(150f / 0.375f)
            .SetOrientation(-Vector2.UnitX)
            .SetUpdateZWithPosition(true)
            .SetCalculateEffectiveSpeedFn(CalculateSpeed)
            .SetScale(0.24f);

            SpineSprite
            .Create(this)
            .SetImage("characters/ego/ego")
            .SetAnimationMixFn(SetAnimationMix)
            .SetOnSpineEvent(SpineEvent)
            .SetOnSpineAnimationEnd(SpineAnimationEnd);

            SpriteData
            .Create(this)
            .SetOrientationFlip(true);

            Scripts
            .Create(this);

            Lightning
            .Create(this)
            .SetLightColor(new Vector3(1.5f, 0.25f, 0.25f));

            Visible = true;
            Enabled = true;
        }
예제 #3
0
        public ShadowEgo()
        {
            Transform
            .Create(this)
            .SetPosition(250, 250)
            .SetSpeed(150f / 0.375f)
            .SetOrientation(-Vector2.UnitX)
            .SetUpdateZWithPosition(true)
            .SetCalculateEffectiveSpeedFn(CalculateSpeed)
            .SetScale(0.5f);

            Sprite
            .Create(this)
            .SetEnableNormalMap(true)
            .SetImage("characters/ego/sprite", 9, 4);

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

            SpriteData
            .Create(this)
            .SetOrientationFlip(false)
            .SetOffset(-40, -310);

            Scripts
            .Create(this);

            Lightning
            .Create(this)
            .SetLightColor(new Vector3(1.5f, 0.25f, 0.25f));

            Visible = true;
            Enabled = true;
        }
예제 #4
0
        public Menu()
        {
            Enabled = false;
            Visible = false;

            State = DialogMenuState.Closed;

            Text
            .Create(this)
            .SetFont(content.fonts.pixeloperator_BMF)
            .SetWidth(Game.VIRTUAL_WIDTH - 2 * Game.SCREEN_PADDING)
            .SetWordWrap(true)
            .SetAlign(Alignment.Left | Alignment.Bottom)
            .SetColor(new Color(150, 150, 150, 255))
            .SetVisible(false);

            HotspotPersistent
            .Create(this);

            Sprite
            .Create(this)
            .SetRenderStage(RenderStage.PostBloom)
            .SetImage(Sprite.WHITEPIXELIMAGE);

            SpriteData
            .Create(this)
            .SetColor(Color.Black);
        }
예제 #5
0
        public RFIDAntennaFloor()
        {
            CameraLocked
            .Create(this)
            .SetEnabled(false);

            Transform
            .Create(this)
            .SetPosition(400, 290)
            .SetUpdateZWithPosition(false)
            .SetZ(-1);

            SpriteData
            .Create(this)
            .SetOffset(-13, -6);

            Scripts
            .Create(this);

            TracerLine
            .Create(this)
            .SetCollider(WoodenPanel.Collider)
            .SetColor(Color.Red)
            .SetHitColor(Color.LightGreen)
            .SetVisible(false);

            Sprite
            .Create(this)
            .SetImage(content.rooms.basement.rfidantenna);

            Enabled = false;
            Visible = false;
        }
예제 #6
0
        public Therapist()
        {
            Transform
            .Create(this)
            .SetPosition(440, 200)
            .SetZ(2)
            .SetAbsolute(true);

            Text
            .Create(this)
            .SetColor(Color.OrangeRed)
            .SetFont(content.fonts.pixeloperator_outline_BMF)
            .SetWidth(300);

            Sprite
            .Create(this)
            .SetImage(content.rooms.office.therapist, 5, 1);

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

            SpriteData
            .Create(this)
            .SetOffset(-87, 45);

            Scripts
            .Create(this);
        }
예제 #7
0
        public Ryan()
        {
            Transform
            .Create(this)
            .SetPosition(290, 170)
            .SetAbsolute(true);

            Text
            .Create(this)
            .SetColor(Color.White)
            .SetFont(content.fonts.pixeloperator_outline_BMF)
            .SetWidth(300);

            Sprite
            .Create(this)
            .SetImage(content.rooms.office.ryan, 20, 1, 19)
            .SetFrame(FRAMENEUTRAL);

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

            SpriteData
            .Create(this)
            .SetOffset(-29, 50);

            Scripts
            .Create(this);

            State     = RyanState.Neutral;
            DrawOrder = PRIORITY;
        }
예제 #8
0
        public Verbs()
        {
            Sprite
            .Create(this)
            .SetRenderStage(RenderStage.PostBloom)
            .SetImage(GlblRes.uiverbs);

            SpriteData
            .Create(this)
            .SetOffset(0, OFFSET);
        }
예제 #9
0
        public VerbsHighlight()
        {
            Sprite
            .Create(this)
            .SetRenderStage(RenderStage.PostBloom)
            .SetImage(GlblRes.uiverbshighlight);

            SpriteData
            .Create(this)
            .SetOffset(0, Verbs.OFFSET);

            Visible = false;
        }
예제 #10
0
        public Fader()
        {
            Sprite
            .Create(this)
            .SetRenderStage(RenderStage.PostBloom)
            .SetImage(Sprite.WHITEPIXELIMAGE);

            SpriteData
            .Create(this)
            .SetColor(Color.Black)
            .SetScale(Game.VIRTUAL_WIDTH, Game.VIRTUAL_HEIGHT);

            DrawOrder = 1;
        }
예제 #11
0
        public Location(string image, int columns = 1, int rows = 1)
        {
            var Background = new Entity(BACKGROUND_ENTITY_ID);

            Background.SetDrawOrder(-2);

            Sprite
            .Create(Background)
            .SetImage(image, columns, rows);

            SpriteData
            .Create(Background);

            Push(Background);
        }
예제 #12
0
        public Drone()
        {
            Sprite
            .Create(this)
            .SetGetPositionFn(GetSpritePosition)
            .SetImage(content.rooms.basement.drone, 5, 4);

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

            CameraLocked
            .Create(this)
            .SetEnabled(false);

            Transform
            .Create(this)
            .SetPosition(INITIAL_POSITION)
            .SetDirection(Directions4.Down)
            .SetUpdateZWithPosition(false)
            .SetZ(INITIAL_Z);

            SpriteData
            .Create(this)
            .SetOffset(-42, -16);

            HotspotSprite
            .Create(this)
            .SetCaption(Basement_Res.drone)
            .SetPixelPerfect(false);

            Interaction
            .Create(this)
            .SetDirection(Directions8.Down)
            .SetGetInteractionsFn(GetInteractions);

            Scripts
            .Create(this);

            DroneDisplacement
            .Create(this);

            Flying  = false;
            Enabled = false;
            Visible = false;
        }
예제 #13
0
        public Mouse()
        {
            Transform
            .Create(this)
            .SetPosition(STARTPOSITION)
            .SetSpeed(120)
            .SetOrientation(-Vector2.UnitX)
            .SetUpdateZWithPosition(true)
            .SetScale(1.0f);

            Sprite
            .Create(this)
            .SetEnableNormalMap(false)
            .SetImage(content.characters.mouse.sprite, 9, 7);

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

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

            SpriteData
            .Create(this)
            .SetOrientationFlip(false)
            .SetOffset(-7, -13);

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

            Scripts
            .Create(this);

            CameraLocked
            .Create(this)
            .SetEnabled(false);

            Visible = false;
            Enabled = false;
        }
예제 #14
0
        public Mouse()
        {
            Transform
            .Create(this);

            Sprite
            .Create(this)
            .SetImage(content.ui.cursor)
            .SetRenderStage(RenderStage.PostBloom);

            SpriteData
            .Create(this)
            .SetOffset(-20, -20);

            MouseFollower
            .Create(this);

            InteractiveVisibility
            .Create(this);
        }
예제 #15
0
        public Mouse()
        {
            Transform
            .Create(this);

            Sprite
            .Create(this)
            .SetImage("rufzeichen", 2)
            .SetFrame(1)
            .SetRenderStage(RenderStage.PostBloom);

            SpriteData
            .Create(this)
            .SetOffset(-20, -20);

            MouseFollower
            .Create(this);

            InteractiveVisibility
            .Create(this);
        }
예제 #16
0
        public RyanBlooddrop(Vector2 position, byte frame, int ttl, string id, float z) : base(id)
        {
            Sprite
            .Create(this)
            .SetTexture(Game.Ego.Get <BloodDropEmitter>().Texture, 16, 1)
            .SetFrame(16);

            SpriteData
            .Create(this)
            .SetColor(Color.White);

            HotspotSprite
            .Create(this)
            .SetPixelPerfect(true)
            .SetCaption(Basement_Res.drop_of_blood);

            Transform
            .Create(this)
            .SetZ(z)
            .SetPosition(position - new Vector2(0, 55));

            Interaction
            .Create(this)
            .SetPosition(position - new Vector2(0, 55))
            .SetGetInteractionsFn(GetInteractions);

            Scripts
            .Create(this);

            TimeToLive     = Math.Min(500, ttl);
            UpdateCount    = 0;
            TargetFrame    = frame;
            TargetPosition = position;

            Visible = true;
        }
예제 #17
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);
        }