Ejemplo n.º 1
0
    public override void Update()
    {
        if (!moving)
        {
            base.Update();
            return;
        }
        base.Update();

        if (!sittingThere && progress > 0.5f)
        {
            sittingThere           = true;
            steering.allowedToMove = false;
        }

        if (blowingUp)
        {
            if (blastTimer.TimeElapsedSecs() >= blastDuration)
            {
                blowingUp = false;
                //hurt dial
                GameEvent boom = new GameEvent("dial_damaged");
                boom.addArgument(this.gameObject);
                boom.addArgument(blastDamage);
                EventManager.Instance().RaiseEvent(boom);
                //hurt boss if applicable
                GameObject bossObj = GameObject.FindWithTag("Boss");
                if (bossObj != null)
                {
                    Boss b = bossObj.GetComponent <Boss>();
                    b.TakeDamage(blastDamage);
                }
                //hurt enemies
                List <Enemy> casualties = Dial.GetAllEnemiesInZone(GetCurrentTrackID());
                foreach (Enemy e in casualties)
                {
                    if (e != this)
                    {
                        e.TakeDamage(blastDamage);
                    }
                }
                base.Die();
            }
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        //default
        regenAmt = 1.0f;         //amount to regen every regenRate seconds

        hp      = shieldDurability;
        rt      = GetComponent <RectTransform>();
        hpMeter = transform.Find("ShieldHP").gameObject;

        UpdateHPMeter();

        regenBase = 0.0f;

        dialObj = GameObject.FindGameObjectWithTag("Dial");
        dial    = dialObj.GetComponent <Dial>();

        currentLaneID = GetCurrentLaneID();
    }
Ejemplo n.º 3
0
        public ActionResult Connect(string phoneNumber)
        {
            var response = new VoiceResponse();

            var dial = new Dial(callerId: _credentials.PhoneNumber);

            if (phoneNumber != null)
            {
                dial.Number(phoneNumber);
            }
            else
            {
                dial.Client("support_agent");
            }
            response.Dial(dial);

            return(TwiML(response));
        }
Ejemplo n.º 4
0
    void ChangeDial(int value)
    {
        if (Rings.Count <= 1)
        {
            return;
        }
        if (currentRing.DialNumber + value - 1 >= Rings.Count || currentRing.DialNumber + value - 1 < 0)
        {
            return;
        }
        Dial toActivate = Rings[currentRing.DialNumber + value - 1];

        currentRing.SetActive(false);
        toActivate.SetActive(true);
        currentRing = toActivate;

        CurrentRingNumber = currentRing.Position;
    }
Ejemplo n.º 5
0
    public ActionResult Index(VoiceRequest request)
    {
        var response = new VoiceResponse();

        if (!string.IsNullOrEmpty(request.To))
        {
            var number = new Dial(callerId: "+15017250604");
            number.Number(Request.To);

            response.Dial(number);
        }
        else
        {
            response.Say("Thanks for calling!");
        }

        return(Content(response.ToString(), "text/xml"));
    }
        static void Main(string[] args)
        {
            Response resp = new Response();

            resp.AddRecord(new Dictionary <string, string>()
            {
                { "action", "http://some.domain/recordfile" },
                { "startOnDialAnswer", "true" }
            });

            Dial dial = new Dial(new Dictionary <string, string>()
            {
                { "callerId", "12222222222" },
            });

            dial.AddNumber("12121212121", new Dictionary <string, string>());
            resp.Add(dial);
            Console.WriteLine(resp.ToString());
        }
Ejemplo n.º 7
0
 public override void Open(WindowData data = null)
 {
     base.Open();
     if (data != null)
     {
         foreach (var v in data.DataMap)
         {
             var dial = v.Value as Dial;
             dialInfo        = dial;
             img_Icon.sprite = CResources.Load <Sprite>(dial.Icon);
             if (dial.DefaultAdd > 0)
             {
                 isDefaultAdd  = true;
                 panelName     = "CustomPanel";
                 txt_Name.text = dial.Name;
             }
         }
     }
 }
        public TwiMLResult Outgoing([FromForm] string to)
        {
            string twilioPhoneNumber = configuration["TwilioPhoneNumber"];
            var    response          = new VoiceResponse();
            var    dial = new Dial();

            if (enablePrivacyMode)
            {
                logger.LogInformation($"Calling {MaskPhoneNumber(to)}");
            }
            else
            {
                logger.LogInformation($"Calling {to}");
            }
            dial.CallerId = twilioPhoneNumber;
            dial.Number(to);
            response.Append(dial);
            return(TwiML(response));
        }
Ejemplo n.º 9
0
        public IActionResult Index(string from)
        {
            var response = new VoiceResponse();

            if (from == _twilioPhone)
            {
                var dial = new Dial();
                dial.Conference("Room 1",
                                startConferenceOnEnter: true,
                                endConferenceOnExit: true);
                response.Append(dial);
            }
            else
            {
                response.Reject();
            }

            return(TwiML(response));
        }
Ejemplo n.º 10
0
        public IActionResult GatherExtensionEN(CallParams cp)
        {
            var response = new VoiceResponse();

            // If the user entered digits, process their request
            if (!string.IsNullOrEmpty(cp.Digits))
            {
                var agent = _context.Agents
                            .Where(a => a.Extension.ToString() == cp.Digits)
                            .FirstOrDefault();

                if (agent != null)
                {
                    var call = _context.Calls.Where(c => c.SID == cp.CallSid).FirstOrDefault();

                    if (call != null)
                    {
                        call.AgentCalled = agent;
                        _context.Calls.Update(call);
                        _context.SaveChanges();
                    }



                    //response.Say($"You will be connected to {agent.Name} shortly.").Pause();
                    var dial = new Dial(action: new Uri($"/answer/connect/{agent.ID}", UriKind.Relative));
                    dial.Number(agent.PhoneNumber, url: new Uri("/answer/screenCall", UriKind.Relative));

                    response.Append(dial);
                }
                else
                {
                    response.Say("Sorry, I don't understand that choice.").Pause();
                }
            }
            else
            {
                // If no input was sent, redirect to the /voice route
                response.Redirect(new Uri("/answer", UriKind.Relative));
            }

            return(TwiML(response));
        }
Ejemplo n.º 11
0
    static void Main()
    {
        var response = new VoiceResponse();
        var dial     = new Dial();

        dial.Number("+14155555555", statusCallbackEvent: new [] { Number
                                                                  .EventEnum.Initiated, Number.EventEnum.Ringing, Number.EventEnum
                                                                  .Answered, Number.EventEnum.Completed }.ToList(),
                    statusCallback: new Uri("https://myapp.com/calls/events"),
                    statusCallbackMethod: Twilio.Http.HttpMethod.Post);
        dial.Number("+14153333333", statusCallbackEvent: new [] { Number
                                                                  .EventEnum.Initiated, Number.EventEnum.Ringing, Number.EventEnum
                                                                  .Answered, Number.EventEnum.Completed }.ToList(),
                    statusCallback: new Uri("https://example.com/events"),
                    statusCallbackMethod: Twilio.Http.HttpMethod.Post);
        response.Append(dial);

        Console.WriteLine(response.ToString());
    }
Ejemplo n.º 12
0
    public void PrepTargets()
    {
        targets = Dial.GetAllEnemiesInZone(SpawnIndexToZoneID(thingIdx));
        if (mode == 0)
        {
            List <System.Object> fragList = new List <System.Object>();
            Dictionary <string, System.Object> fragDict = new Dictionary <string, System.Object>();
            fragDict.Add("fragAngle", 0.0);
            fragDict.Add("fragArc", 360.0);
            fragList.Add(fragDict);

            foreach (Enemy e in targets)
            {
                e.Freeze();
                if (e.GetShield() == null)
                {
                    e.GiveShield(10f, 2f, 0.04f, fragList);
                    //e.GetShield().GrowShields();
                }
                else
                {
                    e.GetShield().IncreaseAllShieldHP(10f);
                }
            }
        }
        else if (mode == 1)
        {
            for (int i = 0; i < targets.Count; i++)             //remove unshielded enemies from targets
            {
                if (targets[i].GetShield() == null)
                {
                    targets.RemoveAt(i);
                    i--;
                }
            }
            particleTimer = new Timer();
            foreach (Enemy e in targets)
            {
                e.GetShield().bulked = true;
                e.Freeze();
            }
        }
    }
        public override string ToString()
        {
            d = (Dial)base.Tag;

            Binding myBinding = new Binding("type");
            myBinding.Mode = BindingMode.TwoWay;
            myBinding.Source = d;
            txttype.SetBinding(TextBox.TextProperty, myBinding);

            Binding myBinding2 = new Binding("identifier");
            myBinding2.Mode = BindingMode.TwoWay;
            myBinding2.Source = d;
            txtidentifier.SetBinding(TextBox.TextProperty, myBinding2);


            Binding myBinding3 = new Binding("timeout");
            myBinding3.Mode = BindingMode.TwoWay;
            myBinding3.Source = d;
            txttimeout.SetBinding(TextBox.TextProperty, myBinding3);


            Binding myBinding4 = new Binding("options");
            myBinding4.Mode = BindingMode.TwoWay;
            myBinding4.Source = d;
            txtoptions.SetBinding(TextBox.TextProperty, myBinding4);


            Binding myBinding5 = new Binding("url");
            myBinding5.Mode = BindingMode.TwoWay;
            myBinding5.Source = d;
            txturl.SetBinding(TextBox.TextProperty, myBinding5);



            Binding descbinding = new Binding("Description");
            descbinding.Mode = BindingMode.TwoWay;
            descbinding.Source = d;
            txtdesc.SetBinding(TextBox.TextProperty, descbinding);


            return base.ToString();
        }
Ejemplo n.º 14
0
        public ActionResult Connect(string phoneNumber)
        {
            // Instantiate a new VoiceResponse
            var response = new VoiceResponse();

            // Initialze a Dial object with the phone number passed in with the credentials
            var dial = new Dial(callerId: _credentials.PhoneNumber);

            // If the phone number isn't null, set up the call to the Constituent
            if (phoneNumber != null)
            {
                dial.Number(phoneNumber);
            }

            // Append the Dial object to our response to Twilio
            response.Append(dial);

            // Return the TwiML built above to Twilio so the call can be placed
            return(TwiML(response));
        }
Ejemplo n.º 15
0
        public void RequestParamsTest()
        {
            var parameter = new Dictionary <string, object>
            {
                { "to", "testing to" },
                { "from", "callerid" },
                { "dial-sequentially", true },
                { "action", "dial" }
            };
            var dial = new Dial(parameter);

            Assert.AreEqual(parameter, dial.GetRequestData());

            dial                  = new Dial();
            dial.To               = "testing to";
            dial.From             = "callerid";
            dial.DialSequentially = true;

            Assert.AreEqual(parameter, dial.GetRequestData());
        }
Ejemplo n.º 16
0
        public void TestNestedDial()
        {
            Dial dial = new Dial(hangupOnStar: false, timeLimit: 100);

            dial.Client("client", method: "GET", url: "www.twilio.com");

            var vr = new VoiceResponse();

            vr.Dial(dial);

            Assert.AreEqual(
                vr.ToString(),
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Response>" + Environment.NewLine +
                "  <Dial hangupOnStar=\"false\" timeLimit=\"100\">" + Environment.NewLine +
                "    <Client method=\"GET\" url=\"www.twilio.com\">client</Client>" + Environment.NewLine +
                "  </Dial>" + Environment.NewLine +
                "</Response>"
                );
        }
        public TwiMLResult Incoming([FromForm] string from)
        {
            if (enablePrivacyMode)
            {
                logger.LogInformation($"Receiving call from {MaskPhoneNumber(from)}");
            }
            else
            {
                logger.LogInformation($"Receiving call from {from}");
            }

            var response = new VoiceResponse();
            var dial     = new Dial();

            logger.LogInformation($"Calling blazor_client");
            dial.CallerId = from;
            dial.Client("blazor_client");
            response.Append(dial);
            return(TwiML(response));
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Создать новый входящий звонок
 /// </summary>
 /// <param name="newDial">Параметры звонка</param>
 /// <returns>true - если успешно, false - неудача</returns>
 public bool CreateNewInnerCall(Dial newDial)
 {
     try
     {
         User Abonent = BeelineManager.Instance.BeelineConnect.FindAbonentsBy(newDial.SubscriptionID).Key;
         TelephonyManager.TelephonyLog.Debug("Начало обработки события для " + Abonent.UserName + " CallEventsController.CreateNewInnerCall");
         RelationshipCall call = CreateRelationshipCall(newDial);
         call.Theme     = "Входящий звонок от " + newDial.RemoteAddress;
         call.Type      = EleWise.ELMA.CRM.Enums.RelationshipCallType.Input;
         call.KollCentr = false;
         call.Save();
         TelephonyManager.TelephonyLog.Debug("Обработано успешно для " + Abonent.UserName + " CallEventsController.CreateNewInnerCall");
     }
     catch (Exception ex)
     {
         SendMessage(sysAdmin, "error in CreateNewInnerCall", string.Format("{0} || {1}", ex.Message, ex.TargetSite));
         return(false);
     }
     return(true);
 }
Ejemplo n.º 19
0
    static void Main()
    {
        var response = new VoiceResponse();
        var dial     = new Dial();

        dial.Client("joey",
                    statusCallbackEvent: new List <EventEnum>()
        {
            EventEnum.Initiated,
            EventEnum.Ringing,
            EventEnum.Answered,
            EventEnum.Completed
        },
                    statusCallback: new Uri("https://myapp.com/calls/events"),
                    statusCallbackMethod: HttpMethod.Post);

        response.Append(dial);

        Console.WriteLine(response.ToString());;
    }
Ejemplo n.º 20
0
        public ActionResult ForwardCall(string called, string caller, string fromCity, string fromState)
        {
            var leadSource = _leadSourcesRepository.FirstOrDefault(x => x.IncomingNumberInternational == called);

            _leadsRepository.Create(new Lead
            {
                LeadSourceId = leadSource.Id,
                City         = fromCity,
                State        = fromState,
                PhoneNumber  = caller
            });

            var response = new VoiceResponse();
            var dial     = new Dial();

            dial.Number(leadSource.ForwardingNumber);

            response.Dial(dial);

            return(TwiML(response));
        }
        public ActionResult Connect(string digits)
        {
            var isMuted = digits.Equals("1");                     // Listener
            var canControlConferenceOnEnter = digits.Equals("3"); // Moderator

            var response = new VoiceResponse();

            response.Say("You have joined the conference");

            var dial = new Dial();

            dial.Conference("RapidResponseRoom",
                            waitUrl: "http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient",
                            muted: isMuted,
                            startConferenceOnEnter: canControlConferenceOnEnter,
                            endConferenceOnExit: canControlConferenceOnEnter);

            response.Dial(dial);

            return(TwiML(response));
        }
Ejemplo n.º 22
0
        public void ToXmlWithNoFormatting_DialSipUri_ReturnsEqualToFile()
        {
            // Arrange
            var expectedOutput = GetFileContents("dial-sipuri.xml").RemoveWhiteSpaces();
            var dial           = new Dial()
            {
                SipUri = new List <SipUri>()
                {
                    new SipUri("*****@*****.**")
                }
            };

            _ApidazeScript.AddNode(dial).AddNode(new Hangup());
            const bool noFormatting = false;

            // Act
            var result = _ApidazeScript.ToXml(noFormatting, true);

            // Assert
            result.Should().BeEquivalentTo(expectedOutput);
        }
Ejemplo n.º 23
0
    static void Main()
    {
        var response = new VoiceResponse();
        var dial     = new Dial();

        dial.Number("+14158675309",
                    statusCallbackEvent: new List <Number.EventEnum> (
                        new Number.EventEnum [] {
            Number.EventEnum.Initiated,
            Number.EventEnum.Ringing,
            Number.EventEnum.Answered,
            Number.EventEnum.Completed
        }),
                    statusCallback: new Uri("https://myapp.com/calls/events"),
                    statusCallbackMethod: HttpMethod.Post
                    );

        response.Append(dial);

        Console.WriteLine(response.ToString());;
    }
Ejemplo n.º 24
0
        public void ToXmlWithNoFormatting_DialNumber_ReturnsEqualToFile()
        {
            // Arrange
            var expectedOutput = GetFileContents("dial-number.xml").RemoveWhiteSpaces();
            var dial           = new Dial()
            {
                Number = new List <Number>()
                {
                    new Number("1234567890")
                }
            };

            _ApidazeScript.AddNode(dial).AddNode(new Hangup());
            const bool noFormatting = false;

            // Act
            var result = _ApidazeScript.ToXml(noFormatting, true);

            // Assert
            result.Should().BeEquivalentTo(expectedOutput);
        }
Ejemplo n.º 25
0
        public void ToXmlWithNoFormatting_DialSipAccount_ReturnsEqualToFile()
        {
            // Arrange
            var expectedOutput = GetFileContents("dial-sipaccount.xml").RemoveWhiteSpaces();
            var dial           = new Dial()
            {
                Sipaccount = new List <SipAccount>()
                {
                    new SipAccount("targetsipaccount")
                }
            };

            _ApidazeScript.AddNode(dial).AddNode(new Hangup());
            const bool noFormatting = false;

            // Act
            var result = _ApidazeScript.ToXml(noFormatting, true);

            // Assert
            result.Should().BeEquivalentTo(expectedOutput);
        }
Ejemplo n.º 26
0
        private VoiceResponse AddToResponse(VoiceResponse response, Agent agent)
        {
            var dial = new Dial(method: "POST", action: GetEcho("dial"), timeout: agent.TimeOut, record: agent.Record ? "record-from-answer" : "do-not-record");

            switch (agent.Answer)
            {
            case AnswerType.Number:
                response.Dial(dial.Number(agent.PhoneNumber, method: "POST", url: GetEcho("client")));
                break;

            case AnswerType.Client:
                response.Dial(dial.Client(agent.ClientID, "POST", GetEcho("client")));
                break;

            case AnswerType.Sip:
                response.Dial(dial.Sip(agent.ClientID, method: "POST", url: GetEcho("client")));
                break;
            }

            return(response);
        }
Ejemplo n.º 27
0
 public override void Init()
 {
     base.Init();
     txt_Title.text = "";
     tempDialData   = null;
     this.ifd_InputName.onEndEdit.RemoveAllListeners();
     this.ifd_InputName.onEndEdit.AddListener((value) =>
     {
         if (tempDialData == null)
         {
             tempDialData = new Dial();
         }
         tempDialData.Name = value;
     });
     this.btn_Back.onClick.RemoveAllListeners();
     this.btn_Back.onClick.AddListener(() =>
     {
         Debugger.Log("点击了Back按钮");
         goBack();
     });
     this.btn_Yes.onClick.RemoveAllListeners();
     this.btn_Yes.onClick.AddListener(() =>
     {
         Debugger.Log("点击了Yes按钮");
         save();
         goBack();
     });
     this.btn_Del.onClick.RemoveAllListeners();
     this.btn_Del.onClick.AddListener(() =>
     {
         Debugger.Log("点击了Del按钮");
         modifyInputContent(false);
     });
     this.btn_Add.onClick.RemoveAllListeners();
     this.btn_Add.onClick.AddListener(() =>
     {
         Debugger.Log("点击了Add按钮");
         modifyInputContent(true);
     });
 }
Ejemplo n.º 28
0
    public void OnRevolution()
    {
        if (currentState == state.MOVING)        //start a dive if a dive isn't already in progress
        {
            currentState = state.DIVING;
            radii.y      = -0.2f;
            radii.z      = -diveAcc;
        }

        if (mode >= 1)        //gain speed
        {
            if (thetas.y < maxSpeed)
            {
                thetas.y += speedPerRevolution;
                if (thetas.y > maxSpeed)
                {
                    thetas.y = maxSpeed;
                }
            }
        }
        if (mode >= 2)        //enemies gain speed
        {
            List <Enemy> enemylist = Dial.GetAllEnemies();
            foreach (Enemy e in enemylist)
            {
                GameObject zappything = GameObject.Instantiate(Resources.Load("Prefabs/MainCanvas/ZappyThing")) as GameObject;
                zappything.GetComponent <RectTransform>().sizeDelta = e.GetComponent <RectTransform>().sizeDelta * 1.7f;
                zappything.GetComponent <Lifespan>().BeginLiving(3f);
                zappything.GetComponent <Lifespan>().SetImageToFade(true);
                zappything.transform.SetParent(e.transform, false);

                e.SpeedUp(enemyBoostMultiplier, enemyBoostDuration);
            }
        }
        if (mode >= 3)        //gain life drain
        {
            lifeDrain += lifeDrainPerRevolution;
        }
    }
Ejemplo n.º 29
0
    /// <summary>
    /// 增加或者减少输入框数量
    /// </summary>
    /// <param name="isAdd"></param>
    private void modifyInputContent(bool isAdd = true)
    {
        if (tempDialData == null)
        {
            tempDialData = new Dial();
        }
        if ((tempDialData.Count == 12 && isAdd) || tempDialData.Count == 0 && !isAdd)
        {
            return;
        }

        if (isAdd)
        {
            tempDialData.Count++;
        }
        else
        {
            tempDialData.Count--;
        }
        showInputContents();
        txt_Num.text = tempDialData.Count.ToString();
    }
Ejemplo n.º 30
0
        public TwiMLResult Connect(string digits)
        {
            var extension = digits;
            var agent     = FindAgentByExtension(extension);

            if (agent == null)
            {
                return(RedirectToMenu());
            }

            var response = new VoiceResponse();

            response.Say("You'll be connected shortly to your planet.",
                         voice: "alice", language: "en-GB");

            var dial = new Dial(action: Url.Action("Call", "Agent", new { agentId = agent.Id }));

            dial.Number(agent.PhoneNumber, url: Url.Action("ScreenCall", "Agent"));
            response.Dial(dial);

            return(TwiML(response));
        }
Ejemplo n.º 31
0
    //safe to call if not interactable, as it will just do nothing
    void TryInteractable(GameObject actable, float x_val, float y_val, ref float r_x, ref float r_y)
    {
        //grabbing handle
        if (actable == handle_workspace)
        {
            float dy = (r_y - y_val);
            workspace.transform.position = new Vector3(workspace.transform.position.x, workspace.transform.position.y - dy, workspace.transform.position.z);
        }
        else
        {
            Dial d = actable.GetComponent <Dial>();
            //grabbing dial
            if (d != null)
            {
                Tool  t  = d.tool.GetComponent <Tool>();
                float dx = (r_x - x_val) * -10f;
                d.val = Mathf.Clamp(d.val - dx, 0f, 1f);

                UpdateApplyTool(t);
            }
        }
    }
Ejemplo n.º 32
0
 void Awake()
 {
     GamePause.paused = false;
     canvasTransform = GameObject.Find("Canvas").GetComponent<RectTransform>();
     spawnLayer = GameObject.Find("SpawnOverDialLayer").GetComponent<RectTransform>();
     underLayer = GameObject.Find("SpawnUnderDialLayer").GetComponent<RectTransform>();
     unmaskedLayer = GameObject.Find ("UnmaskedSpawns").GetComponent<RectTransform>();
     healthBar = transform.FindChild("Health").gameObject;
     thisDial = this;
 }
Ejemplo n.º 33
0
 internal static HandleRef getCPtr(Dial obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Ejemplo n.º 34
0
 public static extern void Dial_director_connect(HandleRef jarg1, Dial.SwigDelegateDial_0 delegate0, Dial.SwigDelegateDial_1 delegate1, Dial.SwigDelegateDial_2 delegate2, Dial.SwigDelegateDial_3 delegate3, Dial.SwigDelegateDial_4 delegate4, Dial.SwigDelegateDial_5 delegate5, Dial.SwigDelegateDial_6 delegate6, Dial.SwigDelegateDial_7 delegate7, Dial.SwigDelegateDial_8 delegate8, Dial.SwigDelegateDial_9 delegate9, Dial.SwigDelegateDial_10 delegate10, Dial.SwigDelegateDial_11 delegate11, Dial.SwigDelegateDial_12 delegate12, Dial.SwigDelegateDial_13 delegate13, Dial.SwigDelegateDial_14 delegate14);
Ejemplo n.º 35
0
    // Use this for initialization
    public virtual void Start()
    {
        rt = (RectTransform)transform;
        dialCon = GameObject.Find("Dial").GetComponent<Dial>();
        //EventManager.Instance ().RegisterForEventType ("shot_collided", this);
        //SpriteRenderer sr = transform.gameObject.GetComponent<SpriteRenderer> ();
        //float rad = sr.bounds.size.x / 2;
        //CircleCollider2D collider = transform.gameObject.GetComponent<CircleCollider2D> ();
        //collider.radius = rad;

        highDropRate = 100.0f;
        medDropRate = 33.3f;
        lowDropRate = 0.0f;
        lastPause = false;

        poisonTimer = new Timer();
        poisonTickTimer = new Timer();
        slowTimer = new Timer();
        stunTimer = new Timer();
        knockbackTimer = new Timer();
        //timer = new Timer ();
        //Debug.Log ("enemy radius is " + radius);
    }