//
// $Id: SceneManager.java,v 1.2 2001/08/21 01:07:19 mdb Exp $

package com.threerings.whirled.server;

import com.threerings.cocktail.party.server.PlaceManager;
import com.threerings.whirled.data.Scene;

public class SceneManager extends PlaceManager
{
    public Scene getScene ()
    {
        return _scene;
    }

    /**
     * Called by the scene registry once the scene manager has been
     * created (and initialized), but before it is started up.
     */
    protected void postInit (Scene scene, SceneRegistry screg)
    {
        _scene = scene;
        _screg = screg;
    }

    /**
     * We're fully ready to go, so now we register ourselves with the
     * scene registry which will make us available to the clients and
     * system at large.
     */
    protected void didStartup ()
    {
        super.didStartup();
        _screg.sceneManagerDidInit(this);
    }

    protected void toString (StringBuffer buf)
    {
        super.toString(buf);
        buf.append("scene=").append(_scene);
    }

    protected Scene _scene;
    protected SceneRegistry _screg;
}

//
// $Id: SceneManager.java,v 1.3 2001/08/22 00:09:52 mdb Exp $

package com.threerings.whirled.server;

import com.threerings.cocktail.party.chat.ChatMessageHandler;
import com.threerings.cocktail.party.chat.ChatService;
import com.threerings.cocktail.party.server.PlaceManager;

import com.threerings.whirled.data.Scene;

public class SceneManager extends PlaceManager
{
    public Scene getScene ()
    {
        return _scene;
    }

    /**
     * Called by the scene registry once the scene manager has been
     * created (and initialized), but before it is started up.
     */
    protected void postInit (Scene scene, SceneRegistry screg)
    {
        _scene = scene;
        _screg = screg;
    }

    /**
     * We're fully ready to go, so now we register ourselves with the
     * scene registry which will make us available to the clients and
     * system at large.
     */
    protected void didStartup ()
    {
        super.didStartup();
        _screg.sceneManagerDidInit(this);

        // register a chat message handler because we want to support
        // chatting
        MessageHandler handler = new ChatMessageHandler();
        registerMessageHandler(ChatService.SPEAK_REQUEST, handler);
    }

    protected void toString (StringBuffer buf)
    {
        super.toString(buf);
        buf.append("scene=").append(_scene);
    }

    protected Scene _scene;
    protected SceneRegistry _screg;
}

Add chat support by default into the Whirled scene manager. This will probably come out again because it should really be added by the manager used by the target application. They may not want exactly the same kind of chat support.
Add chat support by default into the Whirled scene manager. This will
probably come out again because it should really be added by the manager
used by the target application. They may not want exactly the same kind of
chat support.


git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@307 542714f4-19e9-0310-aa3c-eee0fc999fb1
