Example #1
0
		public Player(Stage stage, float x, float y, int width, int height, int HP)
			: base(stage, x, y, width, height)
		{
			LoadXML("Player", "Xml\\Objects_Base.xml");
            this.MAXTAS = defMAXTAS;
			this.TASpower = initialTAS;
			this.HP = HP;
			this.activeDistance = defActiveDistance;
			sword = new Sword(stage, 200, 100, 64, 8, this);
			turnsRight = true;
			animation = new Animation(width, height);
			syouryuuMode = true;

			Load();
		}
Example #2
0
        // コンストラクタ
        public Rival(Stage stage, float x, float y, int width, int height, int HP, float vx, int bulletType, int shootType)
            : base(stage, x, y, width, height, HP, bulletType, shootType)
        {
            bind = new Object(stage, x, y, 16, 16);
            sword = new Sword(stage, 200, 100, 64, 8, this);
            thunderTurret = new Turret(stage, this, new Vector2(5), 64, 48, 2, 0, 3, false, true, 3, 3);
            cutterTurret = new Turret(stage, this, this.position, 32, 32, 0, 0, 1, false, true, 0, 4);
            cutterTurret.bulletSpeed = new Vector2(-20, 0);
            syuriken = new Turret(stage, this, new Vector2(5), 32, 32, 0, 0, 1, false, true, 0, 2, 10, 10, 5, new Vector2(-10, 0), false, false, "katana");
            //syuriken = new Turret(stage, this, this.position, 32, 32, 0, 1, 1, false, true, false, 3, 0, 2, 10, 120, 30, new Vector2(-10, 0), false, false);
            //syuriken = new Turret(stage, this, this.position, 32, 32, 0, 0, 1, false, true, false, 3, 0, 4);
            //syuriken.bulletSpeed = new Vector2(-10, 0);
            turrets.Add(thunderTurret);
            turrets.Add(cutterTurret);
            turrets.Add(syuriken);
            weapons.Add(thunderTurret);

            obstacleWindSmall = new Obstacle(stage, this, x, y, 32, 32, 2, 3);	// =MapObjectsを生成 // 2
            obstacleWindLarge = new Obstacle(stage, this, x, y, 32, 32, 2, 4);
            weapons.Add(obstacleWindSmall);
            weapons.Add(obstacleWindLarge);
            weapons.Add(sword);
            foreach (Turret tur in turrets) weapons.Add(tur);
            foreach (Weapon weapon in weapons) stage.weapons.Add(weapon);		// stageのweaponsに追加

            defaultPosition = new Vector2(x, y);// 15000, 360
            defPosOtherSide = new Vector2(x - 480, y);
            attackPosition = new Vector2(x, y - 200);							// 雷撃とか用
            CenterPos = new Vector2(defaultPosition.X - 240, 240);
            //turnsRight = true;
            animation = new Animation(48, 48);
            jumpAnimation = new Animation(48, 48);
            rnd = new Random();
            maxSpeed = 28;
            //Load();
        }