示例#1
0
        public Player(enviroment env)
        {
            anzeige = new animatedSprite();
            int[] temp = {
                    statsGame.PlayerSpawnpoint[0]*statsGame.lineSize[0],
                    statsGame.PlayerSpawnpoint[1]*statsGame.lineSize[1]
                };
            anzeige.setPosition(temp,false);
            anzeige.setSize(statsGame.lineSize);

            //Gameplayeinstellungen:
            maxLife = statsGame.playerStartLife;
            invincible = false;
            life = maxLife;
            invincibleTime = 0;
            maxInvincibleTime = statsGame.PlayerMaxInvincibleTime;

            int aktDirection = 0;

            //Verweise:
            this.env = env;

            //Inventar:
            inventory = new Inventory(8);
            inventory.setPlayer(this);
            inventory.setEnviroment(env);
        }
示例#2
0
        public NPC(int[] position,enviroment env,int damage,int speed)
        {
            anzeige = new animatedSprite();
            anzeige.setPosition(position, false);
            //anzeige.setSize(NPCStats.mobSize);

            r = new Random();
            nextTurn = r.Next(1000);

            this.env = env;
            this.damage = damage;
            this.speed = speed;
        }