public ClearanceStatisticsForm(int gateTotal)
        {
            InitializeComponent();

            this.comboBox_sex.SelectedIndex = 0;

            //以下初始化通道
            object[] items = new object[gateTotal + 1];
            items[0] = "全部";
            for (int i = 1; i < gateTotal + 1; i++)
            {
                items[i] = i.ToString();
            }
            this.comboBox__channel.Items.AddRange(items);
            this.comboBox__channel.SelectedIndex = 0;

            //异常类型
            this.comboBox_abnormal.Items.AddRange(AbnormalType.getAllAbnormalTypeNames());
            this.comboBox_abnormal.SelectedIndex = 0;

            this.dateTimePicker_startTime.Format    = DateTimePickerFormat.Custom;
            this.dateTimePicker_startTime.Text      = DateTime.Now.ToString();
            this.dateTimePicker_startTime_time.Text = DateTime.Now.ToString();
            this.dateTimePicker_endTime.Format      = DateTimePickerFormat.Custom;
            this.dateTimePicker_endTime.Text        = DateTime.Now.ToString();
            this.dateTimePicker_endTime_time.Text   = DateTime.Now.ToString();
        }
示例#2
0
        public static IProductAbnormalSubmit GetAbnormalMethod(AbnormalType type)
        {
            IProductAbnormalSubmit product;

            switch (type)
            {
            case AbnormalType.NC:
                product = new ProductAbnormalSubmitByNc();
                return(product);

            case AbnormalType.Jia:
                product = new ProductAbnormalSubmitByFixture();
                return(product);

            case AbnormalType.Blank:
                product = new ProductAbnormalSubmitByBlank();
                return(product);

            case AbnormalType.Tool:
                product = new ProductAbnormalSubmitByTool();
                return(product);

            default:
                return(null);
            }
        }
示例#3
0
    private void spawnCustomWaveTitans()
    {
        if (this.customWaves.ContainsKey(this.currentWave))
        {
            WaveSpawnInfo info = this.customWaves[this.currentWave];
            if (info.spawnByRatio)
            {
                for (int i = 0; i < info.amountToSpawn; i++)
                {
                    AbnormalType type = this.getAbnormalTypeByRatio(info.nRatio, info.aRatio, info.jRatio, info.cRatio, info.pRatio);
                    float        size = UnityEngine.Random.Range(info.sizeMin, info.sizeMax);;
                    Vector3      pos  = this.spawnLocations[UnityEngine.Random.Range(0, this.spawnLocations.Length)];
                    this.spawnTitan(type, size, pos, this.qUp);
                }
            }
            else
            {
                foreach (string s in info.toSpawn)
                {
                    int          amount = int.Parse(s.Substring(0, s.Length - 1));//This could cause an exception if the string is malformed, but f**k it
                    AbnormalType type   = TitanSize.getTitanType(s[s.Length - 1]);

                    for (int i = 0; i < amount; i++)
                    {
                        float   size = UnityEngine.Random.Range(info.sizeMin, info.sizeMax);;
                        Vector3 pos  = this.spawnLocations[UnityEngine.Random.Range(0, this.spawnLocations.Length)];

                        this.spawnTitan(type, size, pos, this.qUp);
                    }
                }
            }
        }
    }
示例#4
0
    public void setModifier(AbnormalType type, float mod)
    {
        switch (type)
        {
        case AbnormalType.NORMAL:
            normalModifier = mod;
            break;

        case AbnormalType.TYPE_CRAWLER:
            crawlerModifier = mod;
            break;

        case AbnormalType.TYPE_I:
            aberrantModifier = mod;
            break;

        case AbnormalType.TYPE_JUMPER:
            jumperModifier = mod;
            break;

        case AbnormalType.TYPE_PUNK:
            punkModifier = mod;
            break;

        default:
            break;
        }
    }
示例#5
0
 private void doCustomSpawns(int amount, AbnormalType type, Vector3 scale, Vector3 pos)
 {
     for (int i = 0; i < amount; i++)
     {
         //Old titans = TITAN_NEW_1 or TITAN_NEW_2
         GameObject titan = PhotonNetwork.Instantiate("TITAN_VER3.1", pos, Quaternion.Euler(-90f, 0f, 0f), 0);
         new Thread(() => this.changeTitanAttributes(titan, type, scale)).Start();
     }
 }
示例#6
0
    public int getTitanHealth(AbnormalType type, Size size)
    {
        float  sizeMod = 1f;
        float  typeMod = 1f;
        string name    = "" + TitanSize.getRepresentativeChar(size) + TitanSize.getRepresentativeChar(type);
        int    health  = this.getSpecialCase(name);

        if (health > 0)
        {
            return(health);
        }

        switch (size)
        {
        case Size.SMALL:
            sizeMod = smallModifier;
            break;

        case Size.MEDIUM:
            sizeMod = mediumModifier;
            break;

        case Size.LARGE:
            sizeMod = largeModifier;
            break;

        default:
            sizeMod = 1f;
            break;
        }

        switch (type)
        {
        case AbnormalType.NORMAL:
            typeMod = normalModifier;
            break;

        case AbnormalType.TYPE_CRAWLER:
            typeMod = crawlerModifier;
            break;

        case AbnormalType.TYPE_I:
            typeMod = aberrantModifier;
            break;

        case AbnormalType.TYPE_JUMPER:
            typeMod = jumperModifier;
            break;

        case AbnormalType.TYPE_PUNK:
            typeMod = punkModifier;
            break;
        }

        return((int)(this.getMinDamage() * sizeMod * typeMod));
    }
 public void RefreshAbnormalType(AbnormalType refreshAbnormalType)
 {
     if (firstAbnormalState_.state_ == refreshAbnormalType)
     {
         firstAbnormalState_.state_  = secondAbnormalState_.state_;
         secondAbnormalState_.state_ = AbnormalType.None;
     }
     else if (secondAbnormalState_.state_ == refreshAbnormalType)
     {
         secondAbnormalState_.state_ = AbnormalType.None;
     }
 }
    public bool HaveAbnormalType(AbnormalType haveAbnormalType)
    {
        if (firstAbnormalState_.state_ == haveAbnormalType)
        {
            return(true);
        }
        else if (secondAbnormalState_.state_ == haveAbnormalType)
        {
            return(true);
        }

        return(false);
    }
示例#9
0
    public GameObject spawnTitan(AbnormalType type, float size, Vector3 pos, Quaternion rotation)
    {
        GameObject  titanPrefab = this.instantiateTitan(pos, rotation);
        TITAN_SETUP setup       = titanPrefab.GetComponent <TITAN_SETUP>();
        TITAN       titan       = titanPrefab.GetComponent <TITAN>();

        this.currentTitans++;
        this.spawnedTitansHashes.Add(titan.GetHashCode());

        titan.resetLevel(size);

        ModMain.instance.getTaskManager().addLateUpdateTask(new CallRPCsTaks(titan, size, (int)type));
        return(titanPrefab);
    }
示例#10
0
    public void changeTitanAttributes(GameObject titan, AbnormalType type, Vector3 scale)
    {
        Thread.Sleep(100);

        TITAN t = titan.GetComponent <TITAN>();

        lock (t){
            t.nonAI = false;
            t.setAbnormalType(type, type == AbnormalType.TYPE_CRAWLER);
            object[] nslParams = new object[] { scale.x, 0, 0 };
            t.photonView.RPC("netSetLevel", PhotonTargets.AllBuffered, nslParams);
        }
        //titan.transform.localScale = scale;
    }
示例#11
0
        public void StateChangeServerDirect(byte bType, AbnormalType nBuff)
        {
            byte buff = (byte)nBuff; // don't ask //nBuff;//

            switch (bType)
            {
            case 1:
                m_bResHpType = buff;
                break;

            case 2:
                m_bNeedParty = buff;
                break;

            case 3:
                m_nOldAbnormalType = m_bAbnormalType;

                // If we're a GM, we need to show ourselves before transforming.
                // Otherwise the visibility state is completely desynced.
                if (isGM())
                {
                    StateChangeServerDirect(5, (AbnormalType)1);
                }

                m_bAbnormalType = nBuff;
                break;

            case 5:
                m_bAbnormalType = nBuff;
                break;

            case 6:
                buff = m_bPartyLeader;     // we don't set this here.
                break;

            case 7:
                UpdateVisibility((InvisibilityType)buff);
                break;

            case 8:     // beginner quest
                break;
            }

            Packet result = new Packet(WIZ.STATE_CHANGE);

            result += GetSocketID();
            result += bType; /*<< buff;*/
            result += (int)nBuff;
            SendToRegion(result);
        }
示例#12
0
    public bool cmd(string[] args, FengGameManagerMKII gm)
    {
        if (args.Length == 0)
        {
            ModMain.instance.sendToPlayer(help);
            return(true);
        }

        if (args[0].Equals("type", System.StringComparison.OrdinalIgnoreCase))
        {
            AbnormalType type = TitanSize.getTitanType(args[1][0]);
            object[]     aa   = new object[] { (int)type };

            foreach (TITAN t in GameObject.FindObjectsOfType <TITAN>())
            {
                t.photonView.RPC("netSetAbnormalType", PhotonTargets.All, aa);
            }

            return(true);
        }
        else if (args[0].Equals("size", System.StringComparison.OrdinalIgnoreCase))
        {
            float    scale = float.Parse(args[1]);
            object[] aa    = new object[3];

            aa[0] = scale;

            foreach (TITAN t in GameObject.FindObjectsOfType <TITAN>())
            {
                aa[1] = t.myDifficulty;
                aa[2] = 1;
                t.photonView.RPC("netSetLevel", PhotonTargets.All, aa);
            }

            return(true);
        }
        else
        {
            ModMain.instance.sendToPlayer("Argument not recognized: " + args[0]);
            return(true);
        }
    }
示例#13
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                int          id           = int.Parse(context.Request["id"]); //订单id或者工序id
                string       type         = context.Request["type"];          //NC,毛坯,治具,刀具
                AbnormalType abnormalType = AbnormalType.Other;
                string       str          = "请输入正确的报备类型!";
                switch (type)
                {
                case "NC":
                    abnormalType = AbnormalType.NC;
                    break;

                case "治具":
                    abnormalType = AbnormalType.Jia;
                    break;

                case "毛坯":
                    abnormalType = AbnormalType.Blank;
                    break;

                case "刀具":
                    abnormalType = AbnormalType.Tool;
                    break;
                }
                IProductAbnormalSubmit product = AbnormalFactory.GetAbnormalMethod(abnormalType);
                if (product != null)
                {
                    product.AbnormalSubmit(id, ref str);
                }
                context.Response.Write(str);
            }
            catch (Exception ex)
            {
                context.Response.Write(ex.Message);
            }
        }
示例#14
0
    public static char getRepresentativeChar(AbnormalType type)
    {
        switch (type)
        {
        case AbnormalType.NORMAL:
            return('n');

        case AbnormalType.TYPE_CRAWLER:
            return('c');

        case AbnormalType.TYPE_I:
            return('a');

        case AbnormalType.TYPE_JUMPER:
            return('j');

        case AbnormalType.TYPE_PUNK:
            return('p');

        default:
            return('n');
        }
    }
示例#15
0
    public float getModifier(AbnormalType type)
    {
        switch (type)
        {
        case AbnormalType.NORMAL:
            return(normalModifier);

        case AbnormalType.TYPE_CRAWLER:
            return(crawlerModifier);

        case AbnormalType.TYPE_I:
            return(aberrantModifier);

        case AbnormalType.TYPE_JUMPER:
            return(jumperModifier);

        case AbnormalType.TYPE_PUNK:
            return(punkModifier);

        default:
            return(0f);
        }
    }
示例#16
0
    //Spawns N-amount of titans using the custom ratios if enabled, otherwise uses feng's spawns
    private void spawnTitans(int amountToSpawn)
    {
        if (this.isCustomRatios)
        {
            for (int i = 0; i < amountToSpawn; i++)
            {
                AbnormalType type = this.getAbnormalTypeByRatio(this.spawnProbabilities[0], this.spawnProbabilities[1], this.spawnProbabilities[2], this.spawnProbabilities[3], this.spawnProbabilities[4]);
                float        size = UnityEngine.Random.Range(this.minSize, this.maxSize);
                Vector3      pos  = this.spawnLocations[UnityEngine.Random.Range(0, this.spawnLocations.Length)];

                this.spawnTitan(type, size, pos, this.qUp);
            }
        }
        else
        {
            for (int i = 0; i < amountToSpawn; i++)
            {
                Vector3    pos   = this.spawnLocations[UnityEngine.Random.Range(0, this.spawnLocations.Length)];
                GameObject go    = this.doFengSpawn(IN_GAME_MAIN_CAMERA.difficulty == 1 ? 70 : 90, pos, this.qUp, this.currentWave % 5 == 0);
                TITAN      titan = go.GetComponent <TITAN>();
                ModMain.instance.getTaskManager().addLateUpdateTask(new CallRPCsTaks(titan, titan.myLevel, (int)titan.abnormalType));
            }
        }
    }
示例#17
0
 public int getTitanHealth(AbnormalType type, float size)
 {
     return(this.getTitanHealth(type, TitanSize.getBySize(size)));
 }
示例#18
0
    public bool cmd(string[] args, FengGameManagerMKII gm)
    {
        if (args.Length < 2)
        {
            ModMain.instance.sendToPlayer(helpMessages);
            return(true);
        }

        if (args.Length == 2)
        {
            doNormalSpawns(args, gm);
        }
        else if (args[0].Equals("-a"))
        {
            doAnnieSpawn(args, gm);
        }
        else if (args[0].Equals("-c"))
        {
            doCTSpawn(args, gm);
        }
        else
        {
            Vector3 pos   = Vector3.zero;
            Vector3 scale = new Vector3(3f, 3f, 3f);            //large titan

            AbnormalType type = AbnormalType.NORMAL;

            int index  = 0;
            int amount = 0;

            foreach (string s in args)
            {
                if (s.StartsWith("-"))
                {
                    index += 1;
                    switch (s[1])
                    {
                    case 's':
                        float f = float.Parse(args[index]);
                        scale  = new Vector3(f, f, f);
                        index += 1;
                        break;

                    case 't':
                        type   = TitanSize.getTitanType(args[index][0]);
                        index += 1;
                        break;

                    case 'p':
                        float x = float.Parse(args[index]);
                        float y = float.Parse(args[index + 1]);
                        float z = float.Parse(args[index + 2]);
                        pos    = new Vector3(x, y, z);
                        index += 3;
                        break;
                    }
                }
            }

            amount = int.Parse(args[index++]);

            if (pos.Equals(Vector3.zero))
            {
                pos = this.getPlayerPos(args[index]);
            }

            doCustomSpawns(amount, type, scale, pos);
        }

        return(true);
    }
 public AbnormalTypeState(AbnormalType setState)
 {
     state_ = setState;
 }