Projeto

Geral

Perfil

Estatísticas
| Revisão:

root / processing / blacklight / Blackmatter.pde @ 17

Histórico | Ver | Anotar | Download (1,5 KB)

1
/*
2
BLACKLIGHT v1.0
3
Project made for Mestrado de Comunicação Multimédia, Ramo Multimédia Interactivo at Departamento de Comunicação e Arte at Universidade de Aveiro.
4

    
5
Author: Nuno Simaria - nsimaria@ua.pt - #23652
6
Other workgroup members: Ana Filipa Lacerda, Daniela Rei, Renato Costa, Julien Cuenin
7
*/
8

    
9

    
10
class Blackmatter
11
  {
12
  int x = 0;
13
  int y = 0;  
14
  int diameter = 50;
15
  boolean dead = false;
16
  
17
  void setup ()
18
    {
19
    
20
    }
21
   
22
  void draw ()
23
    {
24
    if (this.dead)
25
      return;
26
      
27
    fill (10, 50);
28
    noStroke ();
29

    
30
    ellipse (this.x, this.y, this.diameter, this.diameter);
31
    
32
    if (this.diameter > 0)
33
      this.diameter--;
34
    
35
    
36
    }
37
    
38
  boolean check ()
39
    {
40
    if (this.diameter <= 0)
41
      return true;
42
      
43
    return false;
44
    
45
    /*
46
    if (this.dead)
47
      return false;
48
      
49
    if ((_game_.current.lightlord.minions.length == 0) || (_game_.current.lightlord.minions [0].lighted == null))
50
      return false;  
51
      
52
    for (int i = 0; i < _game_.current.lightlord.minions [0].lighted.size (); i++)
53
      {
54
      int[] coords = (int []) _game_.current.lightlord.minions [0].lighted.get (i);
55
      
56
      Cell cell = _game_.current.battlefield.getCell (coords[0], coords[1]);
57
      println ("balancing");
58
      cell.balance++;
59
      
60
      if ((coords [0] < this.x + 40) && (coords [0] > this.x - 40) && (coords [1] < this.y + 40) && (coords [1] > this.y - 40))
61
        {
62
        this.dead = true;
63
        return true;
64
        }
65
      }
66
    
67
    return false;
68
 */  
69
  }
70
  }