mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Fixed cliff sprite scaling.
This commit is contained in:
parent
26c634ab24
commit
859627d232
2 changed files with 11 additions and 2 deletions
|
@ -2,6 +2,8 @@ SpriteBuilder = require 'lib/sprites/SpriteBuilder'
|
|||
|
||||
floors = ['Dungeon Floor', 'Indoor Floor', 'Grass', 'Grass01', 'Grass02', 'Grass03', 'Grass04', 'Grass05', 'Goal Trigger', 'Obstacle', 'Sand 01', 'Sand 02', 'Sand 03', 'Sand 04', 'Sand 05', 'Sand 06', 'Talus 1', 'Talus 2', 'Talus 3', 'Talus 4', 'Talus 5', 'Talus 6', 'Firn 1', 'Firn 2', 'Firn 3', 'Firn 4', 'Firn 5', 'Firn 6', 'Ice Rink 1', 'Ice Rink 2', 'Ice Rink 3', 'Firn Cliff']
|
||||
|
||||
cliffs = ['Dungeon Pit', 'Grass Cliffs']
|
||||
|
||||
module.exports = class SingularSprite extends createjs.Sprite
|
||||
childMovieClips: null
|
||||
|
||||
|
@ -71,6 +73,13 @@ module.exports = class SingularSprite extends createjs.Sprite
|
|||
@baseScaleY = @scaleY
|
||||
if @camera and @thangType.get('name') in floors
|
||||
@baseScaleY *= @camera.y2x
|
||||
else if @camera and @thangType.get('name') in cliffs
|
||||
if actionName is 'idle_side'
|
||||
@baseScaleX *= @camera.x2y# / 0.85
|
||||
@baseScaleY *= @camera.y2x * 0.85
|
||||
else
|
||||
@baseScaleY *= @camera.y2x / 0.85
|
||||
console.log 'it is a cliff!', actionName, @baseScaleX, @baseScaleY
|
||||
@currentAnimation = actionName
|
||||
return
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
var excludedLevels = ['deadly-dungeon-rescue', 'kithgard-brawl', 'cavern-survival', 'kithgard-mastery', 'destroying-angel', 'kithgard-apprentice', 'wild-horses', 'lost-viking', 'forest-flower-grove', 'boulder-woods', 'the-trials'];
|
||||
|
||||
var scriptStartTime = new Date();
|
||||
var startDay = '2015-05-10';
|
||||
var endDay = '2015-06-11';
|
||||
var startDay = '2015-07-01';
|
||||
var endDay = '2015-08-06';
|
||||
|
||||
log("Dates: " + startDay + " to " + endDay);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue