示例#1
0
protected func Initialize() 
{ 
  // Zufällige Größe
  if (Random(5))
    DoCon(-Random(20) - 40);
  else
    DoCon(-Random(50) - 20);
  // Zufällige Form  
  SetAction("Grass");
  SetPhase(Random(2));
  if (!Random(20)) SetPhase(2);
  // Zufällige Richtung
  if (Random(2)) SetDir(DIR_Right);
  // Drehung nach Erdoberfläche
  var x_off = 18 * GetCon() / 100;
  var y_off = 15 * GetCon() / 100;
  var slope = GetSolidOffset(-x_off, y_off) - GetSolidOffset(x_off, y_off);
  SetR(slope);
  // Höhe anpassen
  while (!GBackSolid(0, 5))
    SetPosition(GetX(), GetY() + 1);
  // Gras bleibt hinter Bäumen
  MoveBehindTrees();
  ScheduleCall(0, "ListenToTime", 1);
}
示例#2
0
protected func Initialize()
{
  Roll();
  if (!Random(3)) 
    DoCon(-Random(40));
  return(1);
}
示例#3
0
protected func Initialize()
{
	DoCon(Random(50));
	if (Random(2))
		SetGraphics("1");
	return;
}
示例#4
0
func Decaying()
{
	if (GetCon()<20) RemoveObject(); else DoCon(-5);
	return true;
}
示例#5
0
文件: Object.c 项目: 772/openclonk
// Sets the completion of this to new_con.
global func SetCon(int new_con, int precision, bool grow_from_center)
{
	return DoCon(new_con - GetCon(), precision, grow_from_center);
}
示例#6
0
protected func Decaying()
{
  DoCon(-2);
}
示例#7
0
private func Melt() {
  DoCon(-2);
  CastPXS("Water",8,0);
}
示例#8
0
protected func Initialize() { DoCon(-20-Random(50)); }