예제 #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);
        }
    }
예제 #2
0
파일: Entity.cs 프로젝트: nasr250/Valkan
    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);
        }
    }
예제 #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);
        }
    }