Projeto

Geral

Perfil

Revisão 18

Adicionado por Dinis Adriano Domingosmais de 9 anos atrás

Future Places RC

Ver diferenças:

Blackminion.pde
10 10
  {
11 11
  int x = 200;
12 12
  int y = 200;
13
  int diameter = 20;
13
  int diameter = 50;
14 14
  Input input = null;  
15 15
  Blacklord blacklord = null;
16 16
  
......
42 42
    this.x = this.x + (this.input.horizontal ()/10);  
43 43
    this.y = this.y + (this.input.vertical ()/10);  
44 44
    
45
    if (this.x >= _game_.width - 20 - this.diameter)
46
      this.x = _game_.width - 20 - this.diameter;
47
    if (this.y >= _game_.height - 20 - this.diameter)
48
      this.y = _game_.height - 20 - this.diameter;
49
    if (this.x <= this.diameter + 20)
50
      this.x = this.diameter + 20;
51
    if (this.y <= this.diameter + 20)
52
      this.y = this.diameter + 20;
45
    if (this.x >= _game_.width - 10 - this.diameter)
46
      this.x = _game_.width - 10 - this.diameter;
47
    if (this.y >= _game_.height - 10 - this.diameter)
48
      this.y = _game_.height - 10 - this.diameter;
49
    if (this.x <= this.diameter + 10)
50
      this.x = this.diameter + 10;
51
    if (this.y <= this.diameter + 10)
52
      this.y = this.diameter + 10;
53 53
    
54 54
//    if (this.input.fire () && (this.jammed == false))
55 55
//      {
......
67 67
      }
68 68
    
69 69
    fill (1);
70
    stroke (255, 75);
71
    strokeWeight (3);
70
    noStroke();
72 71
    ellipse (this.x, this.y, this.diameter, this.diameter);
73
    strokeWeight (1);
74 72
    }
75 73
    
76 74
  void fire ()
......
92 90
      {
93 91
      Blackmatter matter = new Blackmatter ();
94 92
    
95
      matter.x = int (random (20, _game_.width - 20));
96
      matter.y = int (random (20, _game_.height - 20));
93
//      matter.x = int (random (20, _game_.width - 20));
94
//      matter.y = int (random (20, _game_.height - 20));
95

  
96
      matter.x = this.x; //int (random (20, _game_.width - 20));
97
      matter.y = this.y; // int (random (20, _game_.height - 20));
98
      matter.vx = random (-5, 5);
99
      matter.vy = random (-5, 5);
100

  
97 101
    
98 102
      matter.setup ();
99 103
      this.blacklord.blackmatter.add (matter);
100 104
      }
101 105
    }
102
  }
106
  }

Também disponível em: Unified diff