User Tools

Site Tools


proton_entity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
proton_entity [2010/10/26 14:16]
seth
proton_entity [2012/02/07 09:38] (current)
aki
Line 36: Line 36:
 If you take a look at Entity.h you'll see some functions but nothing about thinking/​updating or drawing. ​ So what can an entity do? If you take a look at Entity.h you'll see some functions but nothing about thinking/​updating or drawing. ​ So what can an entity do?
  
-Well, not much, alone. ​ It's fairly lightweight at about 200 bytes.+Well, not much, alone. ​ It's fairly lightweight at about 200 byte memory footprint.
  
 The power comes from Components. ​ Components can (but don't have to) render, think, and process input. The power comes from Components. ​ Components can (but don't have to) render, think, and process input.
Line 67: Line 67:
 {{:​entity_1.png?​|}} {{:​entity_1.png?​|}}
  
-Well, we see the logo there. ​ If you looked inside of CreateOverlayEntity,​ you'd see it creates an Entity, and adds a RenderOverlay component to it and sets some properties. (All of which are storied ​in either entity'​s VariantDB (like pos2d, color, scale2d, etc) or the components ​VariantDB if it is specific to the component. (properties like fileName, and framex, framey)+Well, we see the logo there. ​ If you looked inside of CreateOverlayEntity,​ you'd see it creates an Entity, and adds a RenderOverlay component to it and sets some properties. (All of which are stored ​in either entity'​s VariantDB (like pos2d, color, scale2d, etc) or the component'​s ​VariantDB if it is specific to the component. (properties like fileName, and framex, framey)
  
 Add a few more lines of code: Add a few more lines of code:
Line 107: Line 107:
 //zoom to bottom right again //zoom to bottom right again
 ZoomToPositionEntityMulti(pEnt,​ GetScreenSize()-imageSize,​ 1000, INTERPOLATE_SMOOTHSTEP,​ 3000); ZoomToPositionEntityMulti(pEnt,​ GetScreenSize()-imageSize,​ 1000, INTERPOLATE_SMOOTHSTEP,​ 3000);
-FadeOutAndKillEntity(pEnt,​ true, 1000, 4000)+FadeOutAndKillEntity(pEnt,​ true, 1000, 4000);
 </​code>​ </​code>​
  
proton_entity.1288102594.txt.gz ยท Last modified: 2010/10/26 14:16 by seth