public Background(Vector3 location, Vector3 scale, SpriteSheet sprite, float speed, String sp)
					: base(location, scale, true, true, Billboarding.Lock2d, sprite) {
			this.speed = speed;
            this._sprite_path = sp;
			startLoc = new Vector3(_location);
			theoretical = new Vector3(_location);
		}
		public ProjectileProperties(Vector3 scale, Vector3 pbox, Vector3 cbox, bool existsIn2d, bool existsIn3d, int damage,
										float speed, bool gravity, SpriteSheet sprite, Effect death = null, double staminaCost = 0.0, double duration = -1.0) {
			this.scale = scale;
			this.pbox = pbox;
			this.cbox = cbox;
			this.existsIn2d = existsIn2d;
			this.existsIn3d = existsIn3d;
			this.damage = damage;
			this.speed = speed;
			this.gravity = gravity;
			this.staminaCost = staminaCost;
			this.duration = duration;
			this.sprite = sprite;
			this.deathAnim = death;
		}
		public Decoration(Vector3 location, Vector3 scale, bool existsIn2d, bool existsIn3d, Billboarding bb, SpriteSheet sprite) : base() {
			_location = location;
			_scale = scale;
			_existsIn3d = existsIn3d;
			_existsIn2d = existsIn2d;
			_mesh = mesh;
			_texture = texture;
			_sprite = sprite;
			_cycleNum = 0;
			_frameNum = 0;
			_is3dGeo = false;
            _hascbox = false;
			_billboards = bb;
			_animDirection = 1;
		}
		public Obstacle(Vector3 location, Vector3 scale, Vector3 pbox, bool existsIn2d, bool existsIn3d, bool collidesIn2d, bool collidesIn3d,
							Billboarding bb, SpriteSheet sprite) : base() {
			_location = location;
			_scale = scale;
            _pbox = pbox;
			_existsIn3d = existsIn3d;
			_existsIn2d = existsIn2d;
			_mesh = null;
			_texture = null;
			_sprite = sprite;
			_cycleNum = 0;
			_frameNum = 0;
			_frame3d = 0;
			_is3dGeo = false;
			_hascbox = false;
            canSquish = false;
			_collidesIn2d = collidesIn2d;
			_collidesIn3d = collidesIn3d;
			_billboards = bb;
			_animDirection = 1;
		}
        public GorillaBossobject(Player player, Vector3 location, Vector3 pbox, Vector3 cbox, Vector3 scale, bool existsIn2d, bool existsIn3d, int health, int damage, float speed,
            SpriteSheet sprite) {
            _location = location;
            _scale = scale;
            _pbox = pbox;
            _cbox = cbox;
            _existsIn3d = existsIn3d;
            _existsIn2d = existsIn2d;
            _health = health;
            _damage = damage;
            _speed = speed;
            _alive = true;
            _hascbox = true;
            _type = 3;
            frozen = false;
            freezetimer = 0;
            maxFreezeTime = 0.7;
            this.player = player;

            _mesh = null;
            _texture = null;
            _sprite = sprite;
            _frameNum = 0;
            _is3dGeo = false;
            _animDirection = 1;

            velocity = new Vector3(0, 0, 0);
            accel = new Vector3(0, 0, 0);
            doesGravity = false;
        }
		internal ZooBoss(Player player, PlayState ps, Vector3 location, int maxheight, ProjectileProperties invisProj, Obstacle crate, Obstacle ground, Obstacle rope, SpriteSheet bossSprite)
            : base(player, ps, location, maxheight, invisProj, crate, ground, rope) {

            //animation
            _sprite = bossSprite;
            _cycleNum = 0;
            _frameNum = 0;
            _animDirection = 1;

			//combat stuff
			_cbox = new Vector3(6, 6, 6);
            _health = 5;
            _damage = 1;
            _speed = 1;
            _alive = true;
            _hascbox = true;
            _type = 3; //Type 3 means this is the boss

			//Offset boss location
			centerLoc = new Vector3(_location);
			_location.X += 8.0f;
			_location.Z -= 0.01f;
			in3d = false;
			bb = Billboarding.Lock2d;

            invincible = false;
        }
        public Enemy(Player player, Vector3 location, Vector3 scale, Vector3 pbox, Vector3 cbox, bool existsIn2d, bool existsIn3d, int health, int damage, float speed,
						int AItype, SpriteSheet sprite, Effect death, ProjectileProperties proj = null)
        {
			_location = location;
			_scale = scale;
            _pbox = pbox;
            _cbox = cbox;
			_existsIn3d = existsIn3d;
			_existsIn2d = existsIn2d;
            _health = health;
            _damage = damage;
            _speed = speed;
            _alive = true;
            this.AItype = AItype;
            _hascbox = true;
            _type = 1; // type one means this is an enemy
            frozen = false;
            freezetimer = 0;
            maxFreezeTime = 0.7;
            attackspeed = 1;
            attacktimer = 0;
			this.player = player;
			_deathAnim = death;

			_mesh = null;
			_texture = null;
			_sprite = sprite;
			projectile = proj;
            if (projectile != null)
                projectile.damage = damage;
			_frameNum = 0;
			_is3dGeo = false;
			_animDirection = 1;

            velocity = new Vector3(0, 0, 0);
            accel = new Vector3(0, 0, 0);
            doesGravity = true;

            CurrentAI = new Stack<Airoutine>();
            InitilizeAI();
		}
예제 #8
0
 public WeaponThrowable(string id, Engine.Object parent, Engine.SpriteSheet spriteSheet, Engine.Object owner, int damage) : base(id, parent, spriteSheet, owner, damage)
 {
 }
		public Effect(PlayState ps, Vector3 location, Vector3 scale, bool existsIn2d, bool existsIn3d, Billboarding bb, SpriteSheet sprite)
			: base(location, scale, existsIn2d, existsIn3d, bb, sprite) {
				this.playstate = ps;
				timeElapsed = 0.0;
		}
        public Player(SpriteSheet sprite, SpriteSheet arms, List<ProjectileProperties> projectiles, PlayState ps) : base(Int32.MaxValue) //player always has largest ID for rendering purposes
        {
            p_state = new PlayerState("TEST player");
            //p_state.setSpeed(130);
			this.playstate = ps;
            _speed = runSpeed;
			_location = new Vector3(25, 12.5f, 50);
            _scale = new Vector3(25f, 25f, 25f);
            _pbox = new Vector3(5f, 11.0f, 5f);
            _cbox = new Vector3(4f, 10.0f, 4f);
            spinSize = 12; //?? experiment with this, TODO: change it to match the sprites size
			velocity = new Vector3(0, 0, 0);
			accel = new Vector3(0, 0, 0);
			kbspeed = new Vector3(70, 100, 70);
			jumpspeed = 250.0f;
			_cycleNum = 0;
			_frameNum = 0;
			_sprite = sprite;
            _hascbox = true;
            _type = 0; //type 0 is the player and only the player
			_existsIn2d = true;
			_existsIn3d = true;
			onGround = true;

			//arms
			this.arms = new Decoration(_location + new Vector3(0.005f, 0.0f, 0.005f), _scale, true, true, Billboarding.Yes, arms);
			ps.renderList.Add(this.arms);

            //combat things
            _damage = 1;
            spinDamage = 2;
            maxHealth = _health = 7;
			stamina = 5.0;
			maxStamina = 5.0;

			spaceDown = false;
			eDown = false;
            pDown = false;
			isMobile = true;

            Invincible = false;
            HasControl = true;
            Invincibletimer = 0.0;
            NoControlTimer = 0.0;
			fallTimer = 0.0;
			viewSwitchJumpTimer = 0.0;
			projectileTimer = 0.0;
			spinTimer = 0.0;
			lookDownTimer = -1.0;
			squishTimer = -1.0;
			lastPosOnGround = new Vector3(_location);
			_animDirection = 1;
			this.projectiles = projectiles;
			curProjectile = projectiles[0];
            curProjectile.damage = _damage;
			markerList = new List<Decoration>();

			Assembly assembly = Assembly.GetExecutingAssembly();
			jumpSound = new AudioFile(assembly.GetManifestResourceStream("U5Designs.Resources.Sound.jump_sound.ogg"));
			bananaSound = new AudioFile(assembly.GetManifestResourceStream("U5Designs.Resources.Sound.banana2.ogg"));
			HurtSound = new AudioFile(assembly.GetManifestResourceStream("U5Designs.Resources.Sound.hurt.ogg"));
            HitSound = new AudioFile(assembly.GetManifestResourceStream("U5Designs.Resources.Sound.hit.ogg"));
            SpinSound = new AudioFile(assembly.GetManifestResourceStream("U5Designs.Resources.Sound.spin.ogg"));
		}
예제 #11
0
 public Button(string id, Object parent, SpriteSheet spriteSheet, string soundName) : base(id, parent, spriteSheet)
 {
     clickSound = GameInstance.AssetManager.GetSoundEffect("Rocket");
 }