コード例 #1
0
        protected void Create()
        {
            if (!gameObject.activeSelf || !enabled)
            {
                return;
            }

            foreach (var createInfo in createInfos)
            {
                if (!createInfo.enable)
                {
                    continue;
                }
                switch (createInfo._personType)
                {
                case PersonType.Boner:
                    Boner.GetInstance(createInfo.position);
                    break;

                case PersonType.Player:
                    if (GlobalVar.UsePlayerCachePos)
                    {
                        Sworder.GetInstance(DefaultData.PlayerPos);
                    }
                    else
                    {
                        Sworder.GetInstance(createInfo.position);
                        GlobalVar.UsePlayerCachePos = true;
                    }
                    break;

                case PersonType.Spider:
                    Spider.GetInstance(createInfo.position);
                    break;

                case PersonType.Boss:
                    AngryBall.GetInstance(createInfo.position);
                    break;

                case PersonType.Defender:
                    Defender.GetInstance(createInfo.position);
                    break;

                case PersonType.Flyer:
                    Flyer.GetInstance(createInfo.position);
                    break;
                }
            }
        }
コード例 #2
0
        private void Start()
        {
            foreach (var VARIABLE in CharacterInfos)
            {
                switch (VARIABLE._personType)
                {
                case PersonType.Boner:
                    Boner.GetInstance(VARIABLE.position);
                    break;

                case PersonType.Player:
                    Sworder.GetInstance(VARIABLE.position);
                    break;

                case PersonType.Spider:
                    Spider.GetInstance(VARIABLE.position);
                    break;
                }
            }
        }