Пример #1
0
        public Encounter(LandCreature anchor, Land land)
            : base(land)
        {
            this.anchor = anchor;

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = true;
            physicalProperties.collisionType = LandCollisionTypes.Static;
            physicalProperties.radius = encounterRadius;

            Dummy = new DrawableTexture("whiteCircle100x100", this);
            Dummy.size = new Vector2(100f, 100f);
            Dummy.filter = Color.Transparent;
            Dummy.layer = 0.98f;
        }
Пример #2
0
        public Encounter(LandCreature anchor, Land land)
            : base(land)
        {
            this.anchor = anchor;

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = true;
            physicalProperties.collisionType     = LandCollisionTypes.Static;
            physicalProperties.radius            = encounterRadius;

            Dummy        = new DrawableTexture("whiteCircle100x100", this);
            Dummy.size   = new Vector2(100f, 100f);
            Dummy.filter = Color.Transparent;
            Dummy.layer  = 0.98f;
        }
Пример #3
0
        public LandHumanPlayer(Land world, HumanPlayer human, GameManager gameManager)
            : base(world,human)
        {
            this.gameManager = gameManager;
            guy = new DrawableTexture("whiteSquare", this);
            guy.size.X = 10f;
            guy.size.Y = 10f;

            encounterTrigger.encounterHandlers += CreatureEncountered;

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = true;
            physicalProperties.radius = 10f;
            physicalProperties.collisionType = LandCollisionTypes.Solid;
        }
Пример #4
0
        public LandHumanPlayer(Land world, HumanPlayer human, GameManager gameManager)
            : base(world, human)
        {
            this.gameManager = gameManager;
            guy        = new DrawableTexture("whiteSquare", this);
            guy.size.X = 10f;
            guy.size.Y = 10f;

            encounterTrigger.encounterHandlers += CreatureEncountered;

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = true;
            physicalProperties.radius            = 10f;
            physicalProperties.collisionType     = LandCollisionTypes.Solid;
        }
Пример #5
0
        public Tree(int seed,  float radius, Land world)
            : base(world)
        {
            Random rdm = new Random(seed);
            drawTexture = new DrawableTexture(world.getTextureForTree(radius),this);
            //texture.filter = Color.ForestGreen;
            drawTexture.size = Vector2.One * radius*2f;
            drawTexture.layer = 0.05f;
            drawTexture.rotation = (float)rdm.NextDouble() * 2f * (float)Math.PI;
            this.radius = radius;
            oscilation += (float)rdm.NextDouble()*(float)Math.PI*2f;

            shadowTexture = new DrawableTexture(world.getTextureForTree(radius), this);
            shadowTexture.size = Vector2.One * radius * 2f * 1.1f;
            shadowTexture.layer = 0.1f;
            shadowTexture.rotation = drawTexture.rotation;
            shadowTexture.filter = Color.Lerp(Color.Transparent,Color.Black, 0.9f);

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = false;
            physicalProperties.collisionType = LandCollisionTypes.Static;
            physicalProperties.radius = 2f;
        }
Пример #6
0
        public Tree(int seed, float radius, Land world)
            : base(world)
        {
            Random rdm = new Random(seed);

            drawTexture = new DrawableTexture(world.getTextureForTree(radius), this);
            //texture.filter = Color.ForestGreen;
            drawTexture.size     = Vector2.One * radius * 2f;
            drawTexture.layer    = 0.05f;
            drawTexture.rotation = (float)rdm.NextDouble() * 2f * (float)Math.PI;
            this.radius          = radius;
            oscilation          += (float)rdm.NextDouble() * (float)Math.PI * 2f;

            shadowTexture          = new DrawableTexture(world.getTextureForTree(radius), this);
            shadowTexture.size     = Vector2.One * radius * 2f * 1.1f;
            shadowTexture.layer    = 0.1f;
            shadowTexture.rotation = drawTexture.rotation;
            shadowTexture.filter   = Color.Lerp(Color.Transparent, Color.Black, 0.9f);

            physicalProperties = new LandPhysicalProperties();
            physicalProperties.activelyColliding = false;
            physicalProperties.collisionType     = LandCollisionTypes.Static;
            physicalProperties.radius            = 2f;
        }