Beispiel #1
0
    private void NewHost()
    {
        LevelGrid levelGrid = GameWorld.GetObject("tiles") as LevelGrid;

        if (levelGrid.DrawGridPosition(position) != gridPos)
        {
            host    = levelGrid.NewPassenger(levelGrid.DrawGridPosition(position), gridPos, this, host);
            gridPos = levelGrid.DrawGridPosition(position);
        }
        else if (host != "")
        {
            (GameWorld.GetObject(host) as Tile).CheckPassengerPosition(this);
        }
    }
Beispiel #2
0
    private void NewHost()
    {
        //become a passenger of a tile
        LevelGrid levelGrid = GameWorld.GetObject("levelgrid") as LevelGrid;

        //check if on new tile
        if (levelGrid.DrawGridPosition(position) != gridPos)
        {
            host    = levelGrid.NewPassenger(levelGrid.DrawGridPosition(position), gridPos, this, host);
            gridPos = levelGrid.DrawGridPosition(position);
        }
        else if (host != "")
        {
            (GameWorld.GetObject(host) as Tile).CheckPassengerPosition(this);
        }
    }
Beispiel #3
0
    public virtual void NewHost()
    {
        //become a passenger of a tile
        LevelGrid levelGrid = GameWorld.GetObject("levelgrid") as LevelGrid;

        //check if on new tile
        if (levelGrid.GridPosition(position) != gridpos)
        {
            drawHost    = levelGrid.NewPassenger(position, gridpos, this, drawHost);
            gridpos     = levelGrid.GridPosition(position);
            drawgridpos = levelGrid.DrawGridPosition(position);
        }
        else if (drawHost != "")
        {
            (GameWorld.GetObject(drawHost) as Tile).CheckDrawPassengerPosition(this);
        }
    }