Пример #1
0
def draw():
	if settings.drawbackground:
		background.draw()
	else:
		window.screen.fill((0, 60, 0))
	for obj in todraw:
		obj.draw()

	if "cursor" in control:
		image.worlddraw("cursor", control["cursor"].X, control["cursor"].y, 1.6,
			angle = pygame.time.get_ticks() * 0.15)
	if "qtarget" in control:
		X, y = control["qtarget"]
		image.worlddraw("qtarget", X, y, 1,
			angle = -pygame.time.get_ticks() * 0.15)
	dialog.draw()
	hud.draw()
	hud.drawstats()
	state.you.drawhud()
	dy = state.you.y - state.Rcore
	if dy < 36:
		alpha = pygame.time.get_ticks() * 0.001 % 1
		ptext.draw("Warning: Approaching data horizon", midtop = F(854/2, 100), color = "#FF7777",
			owidth = 1, fontsize = F(36), fontname = "NovaSquare", alpha = alpha)
	background.drawwash()
Пример #2
0
def draw():
	if settings.drawbackground:
		background.draw()
	else:
		window.screen.fill((0, 60, 0))
	for obj in todraw:
		obj.draw()
	regenerating = isinstance(state.you, thing.SlowTeleport)

	if "cursor" in control:
		image.worlddraw("cursor", control["cursor"].X, control["cursor"].y, 1.6,
			angle = pygame.time.get_ticks() * 0.15)
	if "qtarget" in control:
		X, y = control["qtarget"]
		image.worlddraw("qtarget", X, y, 1,
			angle = -pygame.time.get_ticks() * 0.15)
	dialog.draw()
	hud.draw()
	if regenerating:
		hud.drawnotice("Emergency transmitter activated")
	else:
		hud.drawstats()
		state.you.drawhud()
		dy = state.you.y - state.Rcore
		if dy < 36:
			hud.drawnotice("Warning: Approaching data horizon")
	background.drawwash()
Пример #3
0
	def draw(self):
		for X, y, t in self.imgs:
			t = (self.t - t) / self.timg
			if not 0 < t < 1:
				continue
			alpha = t * (1 - t)
			image.worlddraw("tremor", X, y, 6, rotate = False, alpha = alpha)
Пример #4
0
	def draw(self):
		if self.y <= 0:
			return
		if not self.tvisible:
			return
		alpha = min(self.tvisible, 0.5 + 0.4 * math.sin(self.t))
		image.worlddraw(self.imgname, self.X, self.y, self.imgr, alpha = alpha, angle = 200 * self.t)
Пример #5
0
def draw():
    if settings.drawbackground:
        background.draw()
    else:
        window.screen.fill((0, 60, 0))
    for obj in todraw:
        obj.draw()
    regenerating = isinstance(state.you, thing.SlowTeleport)

    if "cursor" in control:
        image.worlddraw("cursor",
                        control["cursor"].X,
                        control["cursor"].y,
                        1.6,
                        angle=pygame.time.get_ticks() * 0.15)
    if "qtarget" in control:
        X, y = control["qtarget"]
        image.worlddraw("qtarget",
                        X,
                        y,
                        1,
                        angle=-pygame.time.get_ticks() * 0.15)
    dialog.draw()
    hud.draw()
    if regenerating:
        hud.drawnotice("Emergency transmitter activated")
    else:
        hud.drawstats()
        state.you.drawhud()
        dy = state.you.y - state.Rcore
        if dy < 36:
            hud.drawnotice("Warning: Approaching data horizon")
    background.drawwash()
Пример #6
0
	def draw(self):
		if self.y <= 0:
			return
		if self.tflash:
			if self.tflash * 10 % 2 > 1:
				return
		image.worlddraw(self.imgname, self.X, self.y, self.imgr, angle = -self.vx)
Пример #7
0
 def draw(self):
     alpha = 2 * self.flife * (1 - self.flife)
     image.worlddraw("tremor-white",
                     self.X,
                     self.y,
                     self.s,
                     rotate=False,
                     alpha=alpha)
Пример #8
0
 def draw(self):
     if self.deployed:
         image.worlddraw("shield",
                         self.X,
                         self.y,
                         settings.rshield,
                         rotate=False,
                         alpha=0.6 + 0.4 * math.sin(self.t))
Пример #9
0
 def draw(self):
     if self.y <= 0:
         return
     image.worlddraw(self.imgname,
                     self.X,
                     self.y,
                     self.imgr,
                     angle=-self.vx)
Пример #10
0
	def draw(self):
		for X, y, angle, t, color in self.imgs:
			if not state.Rcore + 7 < y < state.R - 7:
				continue
			t = (self.t - t) / self.timg
			if not 0 < t < 1:
				continue
			alpha = t * (1 - t)
			image.worlddraw("slash-" + color, X, y, 6, angle = angle, alpha = alpha)
Пример #11
0
	def draw(self):
		if not self.tvisible:
			return
		for X, y, t, s, iname in self.imgs:
			t = (self.t - t) / self.timg
			if not 0 < t < 1:
				continue
			alpha = min(self.tvisible, 2 * t * (1 - t))
			image.worlddraw(iname, X, y, s, rotate = False, alpha = alpha)
Пример #12
0
 def draw(self):
     if self.y <= 0:
         return
     image.worlddraw(self.imgname,
                     self.X,
                     self.y,
                     self.imgr,
                     angle=self.imgomega * self.t,
                     alpha=1 - self.flife)
Пример #13
0
	def draw(self):
		for X, y, angle, t in self.imgs:
			if not state.Rcore + 5 < y < state.R - 5:
				continue
			t = (self.t - t) / self.timg
			if not 0 < t < 1:
				continue
			alpha = t * (1 - t)
			image.worlddraw("slash-red", X, y, 6, angle = angle, alpha = alpha)
Пример #14
0
	def draw(self):
		ds = [-0.02 * j for j in range(8, -1, -1)]
		ss = [2, 2, 2, 3.2, 3.2, 3.2, 4, 4, 4]
		for d, s in zip(ds, ss):
			f = math.clamp((self.flife + d) * 1.1, 0, 1)
			if not 0 < f < 1:
				continue
			fp = math.clamp(f * 1.3 - 0.3, 0, 1)
			f = (3 - 2 * f) * f ** 2
			fp = (3 - 2 * fp) * fp ** 2
			X = self.X + fp * (self.X1 - self.X)
			y = self.y + fp * (self.y1 - self.y)
			r = 10 * f * (1 - f)
			a = 25 * self.t + 45 * d + j * math.tau / 6
			image.worlddraw("slash-" + self.color, X + r/y * math.sin(a), y + r * math.cos(a), s, rotate = False)
Пример #15
0
def draw():
	window.screen.fill((0, 0, 0))
	background.drawstars()
	for ship in state.ships:
		ship.draw()
	for effect in state.effects:
		effect.draw()
	if "cursor" in control:
		image.worlddraw("cursor", control["cursor"].X, control["cursor"].y, 1.6,
			angle = pygame.time.get_ticks() * 0.15)
	if "qtarget" in control:
		X, y = control["qtarget"]
		image.worlddraw("qtarget", X, y, 1,
			angle = -pygame.time.get_ticks() * 0.15)
	dialog.draw()
	hud.draw()
Пример #16
0
	def draw(self):
		target = get(self.targetid)
		if not target:
			return
		ds = [-0.02 * j for j in range(8, -1, -1)]
		ss = [2, 2, 2, 3.2, 3.2, 3.2, 4, 4, 4]
		for d, s in zip(ds, ss):
			f = math.clamp((self.flife + d) * 1.2 - 0.1, 0, 1)
			if not 0 < f < 1:
				continue
			f = (3 - 2 * f) * f ** 2
			X = self.X + f * (target.X - self.X)
			y = self.y + f * (target.y - self.y)
			r = 10 * f * (1 - f)
			a = -25 * self.t + 45 * d + j * math.tau / 6
			image.worlddraw("slash-white", X + r/y * math.sin(a), y + r * math.cos(a), s, rotate = False)
Пример #17
0
 def draw(self):
     ds = [-0.02 * j for j in range(8, -1, -1)]
     ss = [2, 2, 2, 3.2, 3.2, 3.2, 4, 4, 4]
     for j, (d, s) in enumerate(zip(ds, ss)):
         f = math.clamp((self.flife + d) * 1.1, 0, 1)
         if not 0 < f < 1:
             continue
         fp = math.clamp(f * 1.3 - 0.3, 0, 1)
         f = (3 - 2 * f) * f**2
         fp = (3 - 2 * fp) * fp**2
         X = self.X + fp * (self.X1 - self.X)
         y = self.y + fp * (self.y1 - self.y)
         r = 10 * f * (1 - f)
         a = 25 * self.t + 45 * d + j * math.tau / 6
         image.worlddraw("slash-" + self.color,
                         X + r / y * math.sin(a),
                         y + r * math.cos(a),
                         s,
                         rotate=False)
Пример #18
0
 def draw(self):
     target = get(self.targetid)
     if not target:
         return
     ds = [-0.02 * j for j in range(8, -1, -1)]
     ss = [2, 2, 2, 3.2, 3.2, 3.2, 4, 4, 4]
     for j, (d, s) in enumerate(zip(ds, ss)):
         f = math.clamp((self.flife + d) * 1.2 - 0.1, 0, 1)
         if not 0 < f < 1:
             continue
         f = (3 - 2 * f) * f**2
         X = self.X + f * (target.X - self.X)
         y = self.y + f * (target.y - self.y)
         r = 10 * f * (1 - f)
         a = -25 * self.t + 45 * d + j * math.tau / 6
         image.worlddraw("slash-white",
                         X + r / y * math.sin(a),
                         y + r * math.cos(a),
                         s,
                         rotate=False)
Пример #19
0
def draw():
    if settings.drawbackground:
        background.draw()
    else:
        window.screen.fill((0, 60, 0))
    for obj in todraw:
        obj.draw()

    if "cursor" in control:
        image.worlddraw("cursor",
                        control["cursor"].X,
                        control["cursor"].y,
                        1.6,
                        angle=pygame.time.get_ticks() * 0.15)
    if "qtarget" in control:
        X, y = control["qtarget"]
        image.worlddraw("qtarget",
                        X,
                        y,
                        1,
                        angle=-pygame.time.get_ticks() * 0.15)
    dialog.draw()
    hud.draw()
    hud.drawstats()
    state.you.drawhud()
    dy = state.you.y - state.Rcore
    if dy < 36:
        alpha = pygame.time.get_ticks() * 0.001 % 1
        ptext.draw("Warning: Approaching data horizon",
                   midtop=F(854 / 2, 100),
                   color="#FF7777",
                   owidth=1,
                   fontsize=F(36),
                   fontname="NovaSquare",
                   alpha=alpha)
    background.drawwash()
Пример #20
0
	def draw(self):
		alpha = 2 * self.flife * (1 - self.flife)
		image.worlddraw("tremor-white", self.X, self.y, self.s, rotate = False, alpha = alpha)
Пример #21
0
	def draw(self):
		if self.deployed:
			image.worlddraw("shield", self.X, self.y, settings.rshield, rotate = False,
				alpha = 0.6 + 0.4 * math.sin(self.t))
Пример #22
0
	def draw(self):
		if self.y <= 0:
			return
		image.worlddraw(self.imgname, self.X, self.y, self.imgr, angle = -self.vx)
Пример #23
0
	def draw(self):
		if self.y <= 0:
			return
		image.worlddraw(self.imgname, self.X, self.y, self.imgr, angle = self.imgomega * self.t,
			alpha = 1 - self.flife)