001/* 002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. 003 * Copyright (C) 2000-2010 The Gridarta Developers. 004 * 005 * This program is free software; you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published by 007 * the Free Software Foundation; either version 2 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License along 016 * with this program; if not, write to the Free Software Foundation, Inc., 017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 018 */ 019 020package net.sf.gridarta.model.gameobject; 021 022import net.sf.gridarta.model.anim.AnimationObjects; 023import net.sf.gridarta.model.archetype.TestArchetype; 024import net.sf.gridarta.model.baseobject.BaseObject; 025import net.sf.gridarta.model.face.FaceObjectProviders; 026import net.sf.gridarta.model.maparchobject.TestMapArchObject; 027import org.jetbrains.annotations.NotNull; 028 029/** 030 * A {@link GameObject} implementation for testing purposes. 031 * @author Andreas Kirschbaum 032 */ 033public class TestGameObject extends DefaultIsoGameObject<TestGameObject, TestMapArchObject, TestArchetype> { 034 035 /** 036 * The serial version UID. 037 */ 038 private static final long serialVersionUID = 1L; 039 040 /** 041 * Creates a new instance. 042 * @param archetype the base archetype 043 * @param faceObjectProviders the face object providers for looking up 044 * faces 045 * @param animationObjects the animation objects for looking up animations 046 */ 047 public TestGameObject(@NotNull final TestArchetype archetype, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) { 048 super(archetype, faceObjectProviders, animationObjects); 049 } 050 051 /** 052 * {@inheritDoc} 053 */ 054 @Override 055 public boolean usesDirection() { 056 throw new AssertionError(); 057 } 058 059 /** 060 * {@inheritDoc} 061 */ 062 @Override 063 public boolean isDrawDouble(final boolean drawDoubleFaces) { 064 return drawDoubleFaces; 065 } 066 067 /** 068 * {@inheritDoc} 069 */ 070 @Override 071 public int getLightRadius() { 072 return 0; 073 } 074 075 /** 076 * {@inheritDoc} 077 */ 078 @Override 079 public void propagateElevation(@NotNull final BaseObject<?, ?, ?, ?> gameObject) { 080 // ignore 081 } 082 083 /** 084 * {@inheritDoc} 085 */ 086 @Override 087 public boolean isScripted() { 088 throw new AssertionError(); 089 } 090 091 /** 092 * {@inheritDoc} 093 */ 094 @NotNull 095 @Override 096 public TestGameObject clone() { 097 return super.clone(); 098 } 099 100 /** 101 * {@inheritDoc} 102 */ 103 @NotNull 104 @Override 105 protected TestGameObject getThis() { 106 return this; 107 } 108 109}