Advertisement
Guest User

Untitled

a guest
Jan 24th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.75 KB | None | 0 0
  1. do
  2.     local FunctionTable = {
  3.         ["Pos"] = function(self)                                                        
  4.             return self.transform:GetPosition()        
  5.         end,
  6.         ["Localpos"] = function(self)                                                        
  7.             return self.transform:GetLocalPosition()    
  8.         end,
  9.         ["Scale"] = function(self)                                                        
  10.             return self.transform:GetLocalScale()      
  11.         end,
  12.         ["Orientation"] = function(self)                                                        
  13.             return self.transform:GetOrientation()      
  14.         end,
  15.         ["Localorientation"] = function(self)                                                        
  16.             return self.transform:GetLocalOrientation()
  17.         end,
  18.         ["Angles"] = function(self)                                                        
  19.             return self.transform:GetEulerAngles()      
  20.         end,
  21.         ["Localangles"] = function(self)                                                        
  22.             return self.transform:GetLocalEulerAngles()
  23.         end,
  24.         ["Parent"] = function(self)                                                        
  25.             return self.GetParent()                    
  26.         end,
  27.         ["Name"] = function(self)                        
  28.             return self:GetName()                            
  29.         end,
  30.         ["Children"] = function(self)                    
  31.             return self:GetChildren()                        
  32.         end
  33.     }
  34.    
  35.     function GameObject.__index(self,key)
  36.         return FunctionTable[key] and FunctionTable[key](self) or GameObject[key]
  37.     end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement