public tentacle(Vector2 pos, Scene par) { string dir = "BonePix"; TextureStatic.Load("tentacle_tip_1", dir); TextureStatic.Load("tentacle_2", dir); TextureStatic.Load("tentacle_3", dir); TextureStatic.Load("tentacle_4", dir); TextureStatic.Load("tentacle_5", dir); TextureStatic.Load("tentacle_base", dir); position = pos; depth = 0.9f; parent = par; vel = new Vector2(0, 0); animator = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Idle), this.position.X, this.position.Y); animator.Depth = .2f; sprite = new Sprite("bus", @"Art", new Vector2(10000, 10000), new Vector2(150, 150), this);//anispr; sprite.bounding = new Vector2(1, 1); sprite.bposition = new Vector2(1, 1); }
public TriviaScene() { Song bgm = Cloud.content.Load <Song>("MilitaireElectronic"); MediaPlayer.Play(bgm); MediaPlayer.IsRepeating = true; Camera2D.cam.Zoom = .5f; animator = new BoneAnimator(null, StaticStanceplayer.GetBoneSet(), StaticStanceplayer.Get(playerStance.Idle), 0, 0); animator.Depth = .6f; //animator.SetAnimation(StaticStanceplayer.GetAnimation(playerAnimation.Idle)); animator.Update(); animator2 = new BoneAnimator(null, StaticStanceplayer2.GetBoneSet(), StaticStanceplayer2.Get(player2Stance.Idle), 0, 0); animator2.Depth = .6f; //animator2.SetAnimation(StaticStanceplayer2.GetAnimation(player2Animation.Idle)); animator2.Update(); answers.Clear(); tr = new StreamReader("../../trivia.txt"); renderables = new RenderableCollection(); Physics.collisions = new CollisionHandler(renderables); toAdd = new List <Renderable>(); toRemove = new List <Renderable>(); TextureStatic.Load("questionBG", @"Art"); TextureStatic.Load("playerAnswerBG", @"Art"); TextureStatic.Load("unknown", @"Art"); TextureStatic.Load("pod", @"Art"); //Ball = new ball(new Vector2(120, 150), this); //renderables.Add(Ball); }
public GameScene() { sky = Color.FromNonPremultiplied(78, 142, 203, 255); grass = Color.FromNonPremultiplied(45, 179, 75, 255); isDead = false; string dir = "BonePix"; TextureStatic.Load("tentacle_tip_1", dir); TextureStatic.Load("tentacle_2", dir); TextureStatic.Load("tentacle_3", dir); TextureStatic.Load("tentacle_4", dir); TextureStatic.Load("tentacle_5", dir); TextureStatic.Load("tentacle_base", dir); animator = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Idle), 0, 0); animator.Depth = .6f; animator2 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk1), 0, 0); animator2.Depth = .7f; animator3 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator3.Depth = .7f; animator4 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator4.Depth = .6f; animator5 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator5.Depth = .7f; roadHeight = 200; counter = 0; worldSpeed = -10; particleTimer = 0; edgeLine = -250; renderables = new RenderableCollection(); Physics.collisions = new CollisionHandler(renderables); toAdd = new List <Renderable>(); toRemove = new List <Renderable>(); player = new Player(new Vector2(120, 150), this); renderables.Add(player); mainbg = new Background("road_railing", @"Art\Backgrounds", new Vector2(-360, 60), new Vector2(-10, 0), 0.15f, true, this); renderables.Add(mainbg); farbg = new Background("far_bg", @"Art\Backgrounds", new Vector2(-360, -370), new Vector2(-10, 0), 0.1f, true, this); renderables.Add(farbg); midbg = new Background("middle_bg", @"Art\Backgrounds", new Vector2(-360, -340), new Vector2(-10, 0), 0.12f, true, this); renderables.Add(midbg); forebg = new Background("foreground_railing", @"Art\Backgrounds", new Vector2(-360, 290), new Vector2(-10, 0), 0.999f, true, this); renderables.Add(forebg); roadbg = new Background("road", @"Art\Backgrounds", new Vector2(-360, 110), new Vector2(-10, 0), 0.11f, true, this); renderables.Add(roadbg); /*voidbg = new Background("void", @"Art", new Vector2(-360, -202), Vector2.Zero, 0.2f, false, this); * renderables.Add(voidbg);*/ TextureStatic.Load("void", "Art"); //tentacle tn = new tentacle(new Vector2(0, 0), this); //renderables.Add(tn); vanSpeed = 0; voidLine = -360; oscillator = 0; animator.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Idle)); animator.Update(); animator2.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk)); animator2.Update(); animator3.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk2)); animator3.Update(); animator4.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk3)); animator4.Update(); animator5.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk4)); animator5.Update(); }