1-- Copyright (C) 2007, 2010 - Bit-Blot 2-- 3-- This file is part of Aquaria. 4-- 5-- Aquaria is free software; you can redistribute it and/or 6-- modify it under the terms of the GNU General Public License 7-- as published by the Free Software Foundation; either version 2 8-- of the License, or (at your option) any later version. 9-- 10-- This program is distributed in the hope that it will be useful, 11-- but WITHOUT ANY WARRANTY; without even the implied warranty of 12-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13-- 14-- See the GNU General Public License for more details. 15-- 16-- You should have received a copy of the GNU General Public License 17-- along with this program; if not, write to the Free Software 18-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20if not v then v = {} end 21 22-- song cave collectible 23 24dofile("scripts/include/collectibletemplate.lua") 25 26function init(me) 27 v.commonInit(me, "Collectibles/upsidedownseed", FLAG_COLLECTIBLE_UPSIDEDOWNSEED) 28end 29 30function update(me, dt) 31 v.commonUpdate(me, dt) 32end 33 34function enterState(me, state) 35 v.commonEnterState(me, state) 36 if entity_isState(me, STATE_COLLECTEDINHOUSE) then 37 createEntity("UpsideDownJelly", "", entity_x(me)-20, entity_y(me)-350) 38 createEntity("UpsideDownJelly", "", entity_x(me)+200, entity_y(me)+50) 39 end 40end 41 42function exitState(me, state) 43 v.commonExitState(me, state) 44end 45