In addition to the "GetSizeFactor" method I would suggest a "GetSize" Method to get the actual size we already see when we hover the mouse on a tile in map editor.
A possible implementation could return a Point type when the first number is the width and the second is the height.
With only GetSizeFactor we cannot always extract the correct size of the shape, this happens, for instance, when we have some tile that isn't 8x8 (eg. Sandbags tiles, pool table tile ,ect).
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
Suggestion: GetSize() method for IObject
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
Nice suggestion. Adding it to the next update (Alpha v.1.3.0). There will be IObject.GetBaseSize() and IObject.GetSize().
GetBaseSize() will return the tile's base size without the size factor. GetSize() will return the current size of the object (BaseSIze * SizeFactor).
GetBaseSize() will return the tile's base size without the size factor. GetSize() will return the current size of the object (BaseSIze * SizeFactor).
5 x
Gurt