Camfight.Form1.EnemyMove C# (CSharp) Method

EnemyMove() public method

public EnemyMove ( packet receiveobj ) : void
receiveobj packet
return void
        public void EnemyMove(packet receiveobj)
        {
            enemy.update(receiveobj.Sector & 0xF);
            int i = 0;

            if (receiveobj.Big && (enemy.Big_used==false) && enemy.Life<big_threshold)
            {
                big_flash = 40;
                myplayer.getHurt(big_damage);
                enemy.Big_used = true;
                soundPunch.Play();
            }
            else
            {
                //right
                if ((receiveobj.Sector & 0xF0) >> 4 == 0xF)
                {
                    ishit=myplayer.isHit((receiveobj.Sector & 0xF00) >> 8);
                    i = 2;
                    soundPunch.Play();
                }
                //left
                if ((receiveobj.Sector & 0xF00) >> 8 == 0xF)
                {
                    ishit=myplayer.isHit((receiveobj.Sector & 0xF0) >> 4);
                    i = 1;
                    soundPunch.Play();
                }
            }
            int face_sec = receiveobj.Sector & 0xF;

            if (face_sec / 3 < 2)
            {
                i += 6;
            }
            else if (face_sec / 3 > 2)
            {
                i += 3;
            }
             /*
                ArrayList seq = animationMove[i].Clone() as ArrayList;
                aniMutex.WaitOne();
                myAnimation.Enqueue(new Animation("player1", seq));
                aniMutex.ReleaseMutex();
            */

            if (ishit == true)
            {
                hit_flash = 18;
                ishit = false;
            }

            if (myplayer.IsAlive == false)//win this game
            {
               // this.Invoke(new InvokeFunction(this.quit), new object[] { });
                this.Invoke(new InvokeFunction3(this.GameOver), new object[] {"l" });
                soundDie.Play();
            }

            aniMutex.WaitOne();
            playstate = i;
            aniMutex.ReleaseMutex();
        }