Exemplo n.º 1
0
 public Entity(int width, int height, int originx, int originy, int elevation, float rotation, bool isVisible, Texture2D sprite)
 {
     //create the struct to hold the variables for the entity
     vars = new EntityVariables
     {
         DrawingVector      = new Vector2(originx, originy),
         CollisionRectangle = new Rectangle(originx - (width / 2), originy - (height / 2), width, height),
         CollisonCircle     = new Circle(originx, originy, width / 2),
         elevation          = elevation,
         isVisible          = isVisible,
         sprite             = sprite,
         rotation           = rotation
     };
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     currentExperiencePoints = Mathf.Clamp(currentExperiencePoints, 0, MAXIMUM_EXP);
     variables = GetComponent <EntityVariables>();
 }
Exemplo n.º 3
0
 void Start()
 {
     entityVariables = GetComponent <EntityVariables>();
 }
Exemplo n.º 4
0
 void Awake()
 {
     script = GetComponent <EntityVariables>();
 }