PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/mt4j/sceneManagement/transition/AbstractTransition.java

http://mt4j.googlecode.com/
Java | 60 lines | 20 code | 8 blank | 32 comment | 1 complexity | efa771438c28c7b063bdea0dc2a13459 MD5 | raw file
 1/***********************************************************************
 2 * mt4j Copyright (c) 2008 - 2010 Christopher Ruff, Fraunhofer-Gesellschaft All rights reserved.
 3 *  
 4 *   This program is free software: you can redistribute it and/or modify
 5 *   it under the terms of the GNU General Public License as published by
 6 *   the Free Software Foundation, either version 3 of the License, or
 7 *   (at your option) any later version.
 8 *
 9 *   This program is distributed in the hope that it will be useful,
10 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 *   GNU General Public License for more details.
13 *
14 *   You should have received a copy of the GNU General Public License
15 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
18package org.mt4j.sceneManagement.transition;
19
20import org.mt4j.MTApplication;
21import org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor;
22import org.mt4j.sceneManagement.AbstractScene;
23
24/**
25 * The Class AbstractTransition.
26 * 
27 * @author Christopher Ruff
28 */
29public abstract class AbstractTransition extends AbstractScene implements ITransition {
30	/**
31	 * Instantiates a new abstract transition.
32	 * 
33	 * @param mtApplication the mt application
34	 * @param name the name
35	 */
36	public AbstractTransition(MTApplication mtApplication, String name) {
37		super(mtApplication, name);
38
39		//Remove all global input processors - we dont want the transition to respond to input
40		AbstractGlobalInputProcessor[] inputProcessors = this.getGlobalInputProcessors();
41        for (AbstractGlobalInputProcessor abstractGlobalInputProcessor : inputProcessors) {
42            this.unregisterGlobalInputProcessor(abstractGlobalInputProcessor);
43        }
44	}
45
46	/* (non-Javadoc)
47	 * @see org.mt4j.sceneManagement.AbstractScene#registerDefaultGlobalInputProcessors()
48	 */
49	@Override 
50	protected void registerDefaultGlobalInputProcessors() {  } //DONT REGISTER INPUT PROCESSORS!
51
52	@Override
53	public void onEnter() {
54	}
55	
56	@Override
57	public abstract void onLeave();
58
59
60}