Ah, H&K; it's nice to see you at least understand my reasoning.
Types are an elegant way to store data and I can see the usefulness of methods, functions and even globals within a Type.
There are 2 reaons why I dont use Types that way.
1). I'm not used to do so. :)
2). Though the ease of sharing code by different Types is improved by the introduction of polymorphism in BMax...well...
An example:
let's say object A needs to know the next position of object B.
Now I would go:
TestObject=B
CalcNewPos()
' now the new position of B would be in Xpos and Ypos and accessible to A.
Now with Methods: (oooow boy!)
Method TestOponent()
xpos=Object[B].CalcNewPosX
ypos=Object[B].CalcNewPosY
End Method
or?:
Method TestOponent()
Object[B].CalcNewPos(xpos,ypos)'by reference'
End Method
?
and if B needs his own next position, can it use the same method?
It still seems a bit like "OverCoding" to me, but I probably messed up and my head hurts already; so there you have it...
Types are an elegant way to store data and I can see the usefulness of methods, functions and even globals within a Type.
There are 2 reaons why I dont use Types that way.
1). I'm not used to do so. :)
2). Though the ease of sharing code by different Types is improved by the introduction of polymorphism in BMax...well...
An example:
let's say object A needs to know the next position of object B.
Now I would go:
TestObject=B
CalcNewPos()
' now the new position of B would be in Xpos and Ypos and accessible to A.
Now with Methods: (oooow boy!)
Method TestOponent()
xpos=Object[B].CalcNewPosX
ypos=Object[B].CalcNewPosY
End Method
or?:
Method TestOponent()
Object[B].CalcNewPos(xpos,ypos)'by reference'
End Method
?
and if B needs his own next position, can it use the same method?
It still seems a bit like "OverCoding" to me, but I probably messed up and my head hurts already; so there you have it...