pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/actions jumper.cxx,1.10,1.11 laser_ki


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions jumper.cxx,1.10,1.11 laser_kill.cxx,1.5,1.6
Date: 13 Sep 2002 18:28:28 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv29298/src/actions

Modified Files:
        jumper.cxx laser_kill.cxx 
Log Message:
- added little marker that this is an unplayable develpment version
- fixed bug in laser_exit_obj
- fixed bug in laser kill

Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- jumper.cxx  10 Sep 2002 19:24:19 -0000      1.10
+++ jumper.cxx  13 Sep 2002 18:28:26 -0000      1.11
@@ -34,6 +34,7 @@
 {
   sprite = Sprite("Pingus/jumper" + to_string(pingu->get_owner ()),
                  "pingus");
+  sprite.set_align_center_bottom ();
 }
 
 void 

Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- laser_kill.cxx      10 Sep 2002 19:24:19 -0000      1.5
+++ laser_kill.cxx      13 Sep 2002 18:28:26 -0000      1.6
@@ -29,22 +29,29 @@
 void
 LaserKill::init(void)
 {
-  sprite = Sprite ("Other/laser_kill0", "pingus");
+  sprite = Sprite ("Other/laser_kill", "pingus",
+                  20.0f, Sprite::NONE, Sprite::ONCE);
+  sprite.set_align_center_bottom ();
 }
 
 void 
 LaserKill::draw (GraphicContext& gc)
 {
-  gc.draw(sprite, pingu->get_pos ());
+  if (pingu->direction.is_left())
+    sprite.set_direction (Sprite::LEFT);
+  else
+    sprite.set_direction (Sprite::RIGHT);
+
+  gc.draw(sprite, pingu->get_pos () - CL_Vector (0, 2));
 }
 
 void
-LaserKill::update(float /*delta*/)
+LaserKill::update(float delta)
 {
-  //if (counter >= (int)(surface.get_num_frames()) - 1) 
-  //{
-  pingu->set_status(PS_DEAD);
-  //}
+  if (sprite.finished ())
+    pingu->set_status(PS_DEAD);
+
+  sprite.update (delta);
 }
 
 } // namespace Actions





reply via email to

[Prev in Thread] Current Thread [Next in Thread]