1 --this is where all the pig's timers are!
3 --this controls how fast the mob punches
4 flying_pig.manage_punch_timer = function(self,dtime)
5 if self.punch_timer > 0 then
6 self.punch_timer = self.punch_timer - dtime
8 --this controls how fast you can punch the mob (punched timer reset)
9 if self.punched_timer > 0 then
10 --print(self.punched_timer)
11 self.punched_timer = self.punched_timer - dtime
15 --this controls the hostile state
16 flying_pig.manage_hostile_timer = function(self,dtime)
17 if self.hostile_timer > 0 then
18 self.hostile_timer = self.hostile_timer - dtime
20 if self.hostile_timer <= 0 then
25 --this stops the pig from flying into the air
26 flying_pig.manage_jump_timer = function(self,dtime)
27 if self.jump_timer > 0 then
28 self.jump_timer = self.jump_timer - dtime