Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.gobase.view.video
  2. {
  3.     import flash.events.Event;
  4.     import flash.events.EventDispatcher;
  5.     import flash.events.IEventDispatcher;
  6.    
  7.     public class Tea extends EventDispatcher
  8.     {
  9.         public static const CONCERNED_ABOUT_TIME:Boolean = false;  
  10.         public static const NEEDS_TO_VISIT_GYM:Boolean = true;  
  11.         public static const HAS_JIRAS:Boolean = true;  
  12.         public static const WANTS_TO_DO_JIRAS:Boolean = true;  
  13.        
  14.         public static const HOT:String;
  15.         public static const WARM:String;
  16.         public static const COLD:String;
  17.        
  18.         public function Tea(target:IEventDispatcher=null)
  19.         {
  20.             super(target);
  21.         }
  22.        
  23.         public function isTeaTime():void
  24.         {
  25.             while(getHeat() == HOT)
  26.             {
  27.                 if(wantsToDoJIRAS)
  28.                 {
  29.                     c$.blow()
  30.                 }
  31.                 else if(hasJiras)
  32.                 {
  33.                     c$.blow()
  34.                 }
  35.                 else if(needsToVisitGym)
  36.                 {
  37.                     c$.blow()
  38.                 }
  39.                 else if(concernedAboutTime)
  40.                 {
  41.                     c$.blow()
  42.                 }
  43.             }
  44.             while(getHeat() == COLD)
  45.             {
  46.                 if(wantsToDoJIRAS)
  47.                 {
  48.                     c$.takesSip()
  49.                 }
  50.                 else if(hasJiras)
  51.                 {
  52.                     c$.takesSip()
  53.                 }
  54.                 else if(needsToVisitGym)
  55.                 {
  56.                     c$.takesSip()
  57.                 }
  58.                 else if(concernedAboutTime)
  59.                 {
  60.                     c$.blow()
  61.                 }
  62.             }
  63.             while(getHeat() == WARM)
  64.             {
  65.                 if(wantsToDoJIRAS)
  66.                 {
  67.                     c$.gulpAndBurp()
  68.                 }
  69.                 else if(hasJiras)
  70.                 {
  71.                     c$.gulpAndBurp()
  72.                 }
  73.                 else if(needsToVisitGym)
  74.                 {
  75.                     c$.gulpAndBurp()
  76.                 }
  77.                 else if(concernedAboutTime)
  78.                 {
  79.                     c$.blow()
  80.                 }
  81.             }
  82.            
  83.             dispatchEvent(new Event("BLOW"));
  84.         }
  85.        
  86.         public function get wantsToDoJIRAS():Boolean
  87.         {
  88.             return WANTS_TO_DO_JIRAS;
  89.         }
  90.         public function get hasJiras():Boolean
  91.         {
  92.             return HAS_JIRAS;
  93.         }
  94.         public function get needsToVisitGym():Boolean
  95.         {
  96.             return NEEDS_TO_VISIT_GYM;
  97.         }
  98.         public function get concernedAboutTime():Boolean
  99.         {
  100.             return CONCERNED_ABOUT_TIME;
  101.         }
  102.        
  103.         public function getHeat():void
  104.         {
  105.             return HOT;
  106.         }
  107.     }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement