Passed
Push — master ( 27e47c...011406 )
by Vincent
03:32
created

active()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 2
cc 1
rs 10
1
/*
2
 * This file is part of ArakneUtils.
3
 *
4
 * ArakneUtils is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU Lesser General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * ArakneUtils is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU Lesser General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Lesser General Public License
15
 * along with ArakneUtils.  If not, see <https://www.gnu.org/licenses/>.
16
 *
17
 * Copyright (c) 2017-2020 Vincent Quatrevieux
18
 */
19
20
package fr.arakne.utils.maps.serializer;
21
22
/**
23
 * Data for a single cell layer
24
 */
25
public interface CellLayerData {
26
    /**
27
     * The object number on the cell
28
     *
29
     * @return int
30
     */
31
    public int number();
32
33
    /**
34
     * The rotation value of the sprite
35
     *
36
     * @return int
37
     */
38
    public int rotation();
39
40
    /**
41
     * Does the sprite has been flipped ?
42
     *
43
     * @return bool
44
     */
45
    public boolean flip();
46
47
    /**
48
     * Check if the layer is active (i.e. has an object)
49
     *
50
     * @return bool
51
     */
52
    default public boolean active() {
53
        return number() != 0;
54
    }
55
}
56