Exemplo n.º 1
0
            private void GUIUpdate()
            {
                StatusSlider(ref hp_, "HP");
                StatusSlider(ref mp_, "MP");
                StatusSlider(ref attack_, "ATTACK");
                StatusSlider(ref speed_, "SPEED");

                name_ = EditorGUILayout.TextField("NAME", name_);
                ID_   = EditorGUILayout.IntField("ID", ID_);

                character_ = (BaseStatus.Character)EditorGUILayout.EnumPopup("CHARACTER", character_);
                if (GUILayout.Button("Create"))
                {
                    CreateCharacterStatus(character_);
                }
            }
Exemplo n.º 2
0
            private void CreateCharacterStatus(BaseStatus.Character _character)
            {
                BaseStatus status;

                switch (_character)
                {
                case BaseStatus.Character.Player:
                    status = new StatusPlayer();
                    status.SetStatus(hp_, mp_, attack_, speed_, name_, startLevel_, ID_);
                    BaseStatus.CreateStatusObject <StatusPlayer>(status);
                    break;

                case BaseStatus.Character.Enemy:
                    status = new StatusEnemy();
                    status.SetStatus(hp_, mp_, attack_, speed_, name_, startLevel_, ID_);
                    BaseStatus.CreateStatusObject <StatusEnemy>(status);
                    break;

                default:
                    status = new BaseStatus();
                    break;
                }
            }