Game Development Community

Continue Game

by Temasek Polytechnic (#0001) · in Torque X Platformer Kit · 01/29/2008 (1:19 am) · 0 replies

Hi,

Can anyone help? I've actually put a stop in the player, but i would like the player to continue the game after it stop. what should i add in order to continue the game?

This is the component part:
protected override bool _confirmPickup(T2DSceneObject ourObject, T2DSceneObject theirObject, ActorComponent actor)
{
if (actor is PlayerActorComponent)
{
actor.Unpossess();
actor.HorizontalStop();
actor.VerticalStop();

// notify the game object that the game has enter the Hotel
Game.Instance.Hotel();

// true = yes, i was picked up. delete me!
return true;
}

// false = no, this guy didn't pick me up.
return true;
}

This is at the Game.cs part
public void Hotel()
{
if (_gameStop)
return;

T2DAnimatedSprite qnImage = TorqueObjectDatabase.Instance.CloneObject("Question");

T2DSceneCamera camera = T2DSceneGraph.Instance.Camera as T2DSceneCamera;
camera.WarpToPosition(camera.Position, 0);

qnImage.Position = camera.Position;
TorqueObjectDatabase.Instance.Register(qnImage);

}