コード例 #1
0
        public Flower(ContentManager content, int index)
        {
            this.index       = index;
            this.aliveSprite = FlowerBuilder.getFlowerSprite(content, index);
            this.dyingSprite = FlowerBuilder.getFlowerSprite(content, index);
            reset();
#if WINDOWS
#if DEBUG
#endif
#endif
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: XXChester/Flowers
        public Player(ContentManager content, SpriteFont font, string name, Vector2 scorePosition, Vector2 turnSpritePosition, string aliveTexture, string dyingTexture,
                      Flower.FlowerType flowerType)
        {
            this.name         = name;
            this.AliveTexture = LoadingUtils.load <Texture2D>(content, aliveTexture);
            this.DyingTexture = LoadingUtils.load <Texture2D>(content, dyingTexture);
            this.FlowerType   = flowerType;
            this.Score        = 0;
            Text2DParams textParams = new Text2DParams();

            textParams.Font        = font;
            textParams.LightColour = ResourceManager.getInstance().TextColour;
            textParams.Position    = scorePosition;
            this.Text = new Text2D(textParams);

            this.myTurnSprite    = FlowerBuilder.getFlowerSprite(content, turnSpritePosition, this.AliveTexture, AnimationState.PlayForwardOnce);
            this.notMyTurnSprite = FlowerBuilder.getFlowerSprite(content, turnSpritePosition, this.DyingTexture, AnimationState.PlayForwardOnce);
        }