@Override public void setConfig(ActorSpriteConfig config) { super.setConfig(config); // find the corresponding entry sprite and its model EntryState estate = (EntryState) ((ActorSprite) _parentScope).getActor(); EntrySprite esprite = _view.getEntrySprite(estate.getKey()); _entryModel = (esprite == null) ? null : esprite.getModel(); }
@Override public void setConfig(ActorSpriteConfig config) { super.setConfig(config); // find the corresponding entry sprite and its model EntryState estate = (EntryState) ((ActorSprite) _parentScope).getActor(); EntrySprite esprite = _view.getEntrySprite(estate.getKey()); _entryModel = (esprite == null) ? null : esprite.getModel(); if (_entryModel == null) { return; } // resolve the state animations ActorSpriteConfig.StatefulEntry sconfig = (ActorSpriteConfig.StatefulEntry) config; _states = new Animation[sconfig.states.length]; for (int ii = 0; ii < _states.length; ii++) { _states[ii] = _entryModel.createAnimation(sconfig.states[ii].animation); } }