Esempio n. 1
0
        public void IncrementState(Player player)
        {
            StartingShipData data = (StartingShipData)player.mount._mountSpecificData;

            data.mode++;
            data.mode %= 3;
            if (data.mode == 2)
            {
                data.offset = new Vector2(6 * crashTime, -crashTime - (Main.screenHeight / 2));
            }
        }
Esempio n. 2
0
        public override bool Draw(List <DrawData> playerDrawData, int drawType, Player drawPlayer, ref Texture2D texture, ref Texture2D glowTexture, ref Vector2 drawPosition, ref Rectangle frame, ref Color drawColor, ref Color glowColor, ref float rotation, ref SpriteEffects spriteEffects, ref Vector2 drawOrigin, ref float drawScale, float shadow)
        {
            spriteEffects = SpriteEffects.FlipHorizontally;
            StartingShipData data = (StartingShipData)drawPlayer.mount._mountSpecificData;

            rotation = data.rot;

            if (data.mode == 2 && data.offset != new Vector2(6 * crashTime, -crashTime - (Main.screenHeight / 2)))
            {
                glowTexture = burnTexs[Main.rand.Next(3)];

                for (int d = 0; d < 2; d++)
                {
                    Dust.NewDust(drawPlayer.position + data.offset + new Vector2(-(glowTexture.Width / 2), -(glowTexture.Height / 2)), glowTexture.Width, glowTexture.Height, 6, 0f, 0f, 150, default, 1.5f);
Esempio n. 3
0
        public void Update(Player player)
        {
            StartingShipData data = (StartingShipData)player.mount._mountSpecificData;

            switch (data.mode)
            {
            case 0:
                data.rot = Math.Max(MathHelper.ToRadians(-90), data.rot - 0.005f);
                break;

            case 1:
                data.offset += new Vector2(0, 2 + (data.offset.Y / 100));
                break;

            case 2:
                data.offset += new Vector2(-6, 1 + (Main.screenHeight / (2f * crashTime)));
                break;

            default:
                throw new InvalidOperationException("I done f****d up");
            }
        }
Esempio n. 4
0
        public int GetState(Player player)
        {
            StartingShipData data = (StartingShipData)player.mount._mountSpecificData;

            return(data.mode);
        }