-
Notifications
You must be signed in to change notification settings - Fork 0
/
terrain_imp.go
104 lines (87 loc) · 2.79 KB
/
terrain_imp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Copyright 2014,2015,2016,2017,2018,2019,2020,2021 SeukWon Kang (kasworld@gmail.com)
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package terrain
import (
"github.com/kasworld/goguelike-single/enum/tile_flag"
"github.com/kasworld/goguelike-single/game/terrain/resourcetilearea"
"github.com/kasworld/goguelike-single/game/terrain/room"
"github.com/kasworld/goguelike-single/game/terrain/viewportcache"
"github.com/kasworld/goguelike-single/game/tilearea"
"github.com/kasworld/goguelike-single/lib/uuidposmani"
"github.com/kasworld/wrapper"
)
// imp terraini
func (tr *Terrain) GetTiles() tilearea.TileArea {
return tr.serviceTileArea
}
func (tr *Terrain) GetTileWrapped(x, y int) tile_flag.TileFlag {
return tr.serviceTileArea[tr.XWrap(x)][tr.YWrap(y)]
}
func (tr *Terrain) GetName() string {
return tr.Name
}
func (tr *Terrain) GetFieldObjPosMan() uuidposmani.UUIDPosManI {
return tr.foPosMan
}
func (tr *Terrain) GetRoomList() []*room.Room {
return tr.roomManager.GetRoomList()
}
func (tr *Terrain) GetResetAfterNAgeing() int64 {
return tr.ResetAfterNAgeing
}
func (tr *Terrain) GetMSPerAgeing() int64 {
return tr.MSPerAgeing
}
func (tr *Terrain) AgeingCount() int64 {
return tr.ageingCount
}
func (tr *Terrain) GetViewportCache() *viewportcache.ViewportCache {
return tr.viewportCache
}
func (tr *Terrain) GetXYLen() (int, int) {
return tr.Xlen, tr.Ylen
}
func (tr *Terrain) GetXLen() int {
return tr.Xlen
}
func (tr *Terrain) GetYLen() int {
return tr.Ylen
}
func (tr *Terrain) GetXWrapper() *wrapper.Wrapper {
return tr.XWrapper
}
func (tr *Terrain) GetYWrapper() *wrapper.Wrapper {
return tr.YWrapper
}
func (tr *Terrain) WrapXY(x, y int) (int, int) {
return tr.XWrap(x), tr.YWrap(y)
}
func (tr *Terrain) GetScript() []string {
return tr.terrainScript
}
func (tr *Terrain) GetTile2Discover() int {
return tr.Tile2Discover
}
func (tr *Terrain) GetRcsTiles() resourcetilearea.ResourceTileArea {
return tr.resourceTileArea
}
func (tr *Terrain) GetOriRcsTiles() resourcetilearea.ResourceTileArea {
return tr.oriTiles
}
func (tr *Terrain) GetActiveObjCount() int {
return tr.ActiveObjCount
}
func (tr *Terrain) GetCarryObjCount() int {
return tr.CarryObjCount
}
func (tr *Terrain) FindPath(dstx, dsty, srcx, srcy int, trylimit int) [][2]int {
return tr.ta4ff.FindPath(dstx, dsty, srcx, srcy, trylimit)
}