Пример #1
0
 public bool checkIfAgressiveTowards(Creature creature)
 {
     if (faction == null)
         return true;
     else
         return faction.checkIfAgressive(creature.faction);
 }
Пример #2
0
 public LandCreature(Creature creature, Land land)
     : base(land)
 {
     this.creature = creature;
     creature.landCreature = this;
     encounterTrigger = new Encounter(this, land);
 }
Пример #3
0
        public FightWorld(Land land, Vector2 landPosition, Creature humanFightCreature, Creature AIFightCreature)
        {
            this.land = land;
            this.landPosition = landPosition;

            humanFighter = humanFightCreature.createFightCreature(this);
            humanFighter.position.X = -300f;
            PlayerManager.getPlayer("player1").addControlable(humanFighter);
            AIFighter = AIFightCreature.createFightCreature(this);
            AIFighter.position.X = 300f;

            floorLevel = 0f;

            //ground
            Dummy dum = new Dummy(this, "whiteSquare");
            dum.texture.filter = Color.Brown;
            dum.texture.size = new Vector2(1000f, 500f);
            dum.position.Y = 300f;

            //sky
            dum = new Dummy(this, "whiteSquare");
            dum.texture.filter = Color.SkyBlue;
            dum.texture.size = new Vector2(1000f, 600f);
            dum.position.Y = -250f;
        }
Пример #4
0
        public void StartFight(Creature playerCreature, Creature otherCreature, Land land, Vector2 position)
        {
            fightWorld = new FightWorld(land, position, playerCreature, otherCreature);

            this.playerCreature = playerCreature;
            this.enemyCreature = otherCreature;

            Rectangle rect = gameManager.getActiveBoxArea();
            activeBox = new ActiveBox(gameManager.world, new Camera(rect.Width, rect.Height, fightWorld));
            activeBox.position = UserInterfaceManager.getUserInterfaceArea("activebox").getCenter();
            activeBox.texture.filter = Color.Transparent;

            fadeTime = 1f;
            fightState = FightState.starting;
        }
Пример #5
0
 public LandHuman(Land land, Creature human)
     : base(human, land)
 {
 }
Пример #6
0
 public void StartFight(Creature creature1, Creature creature2, Vector2 worldPosition)
 {
     gameState = gameManagerState.inFight;
     landManager.StartFight();
     fightManager.StartFight(creature1, creature2, landManager.land, worldPosition);
 }