Changeset 6711 for 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs
- Timestamp:
- 2015-07-01 22:47:21 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs
r6708 r6711 76 76 List<StoryItem> storyItems = new List<StoryItem>(); 77 77 78 private bool canUseExit = true; 79 78 80 public IntMeter BossHealth; 79 private List<Vector> bossSpawnPositions = new List<Vector>(); 81 private List<Vector> bossSpawnPositions = new List<Vector>(); 80 82 81 83 private CycleSlot currentItem; // Laatikossa näkyvä nykyinen kama. … … 325 327 //CreatePlayer(new Vector(-Level.Width/3, Level.Bottom + TILE_SIZE * 2)); 326 328 SetControls(); 327 //Camera.ZoomToLevel();329 328 330 Camera.Follow(player); 329 331 Camera.ZoomFactor = 2.0; … … 472 474 { 473 475 var oldExit = pExit as Exit; 476 if (oldExit == null || oldExit.TargetLevel == null || pExit.IsDestroying || pExit.IsDestroyed) 477 return; 478 479 enemies.Clear(); 480 ClearAll(); 481 482 CreateLevel(oldExit.TargetLevel); 483 var targetExit = exits.FirstOrDefault(e => e.Name == oldExit.TargetExitName); 484 485 BuildUI(); 486 SetControls(); 487 player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2; 488 Add(player); 489 } 490 491 /* 492 void CollidesWithExitFail(PhysicsObject pPlayer, PhysicsObject pExit) 493 { 494 if (!canUseExit) 495 return; 496 497 canUseExit = false; 498 Timer.SingleShot(6, () => canUseExit = true); 499 500 var oldExit = pExit as Exit; 474 501 if (oldExit == null || transition || oldExit.TargetLevel == null || pExit.IsDestroying || pExit.IsDestroyed) 475 502 return; … … 514 541 515 542 // Yritetään päätellä pelaajalle joku järkevä paikka. 516 player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2;543 player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 4; 517 544 518 Camera.Follow(player);519 Camera.ZoomFactor = 2.0;545 //Camera.Follow(player); 546 //Camera.ZoomFactor = 2.0; 520 547 return; 521 548 } … … 545 572 obj.Position += transitionVector; 546 573 } 547 player.Position += transitionVector + Direction.Inverse(dir).GetVector() * TILE_SIZE * 4; 574 //player.Position += transitionVector + Direction.Inverse(dir).GetVector() * TILE_SIZE * 4; 575 player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2; 548 576 549 577 // Zoomataan kameraa sopivasti ja liikutetaan se vanhan kentän päälle, josta se sitten siirtyy uuden kentän päälle. 550 578 Camera.Position += transitionVector; 551 579 Vector pos = Camera.Position; 552 Camera.Follow(player);553 Camera.ZoomFactor = 2.0;580 //Camera.Follow(player); 581 //Camera.ZoomFactor = 2.0; 554 582 Camera.Position = pos; 555 583 } 584 */ 556 585 557 586 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.