예제 #1
0
        public JsonResult <List <Character> > GetAll()
        {
            logger.Log("Inside Characte Controller.GetAll");
            List <Character> myCharacs = repo.Get().ToList();

            return(Json(myCharacs));
        }
예제 #2
0
 /// プレイヤーキャラクターID指定でデータを引きつつ、キャラクターステータスを返してくれるメソッド。
 /// バトル依存ではないのでキャラクターステータスクラスの名前空間は後で変える。
 /// バルク処理も後で考える。
 public IObservable <BattleScene.CharacterStatus> LoadCharacterStatusByPlayerCharacterID(uint id)
 {
     return(PlayerCharacterRepository.Get(id).SelectMany(playerData =>
     {
         return CharacterRepository.Get(playerData.CharacterID)
         .Select(masterData => new BattleScene.CharacterStatus(playerData, masterData))
         .SelectMany(cs => cs.LoadGears());
     }));
 }
예제 #3
0
        public async void ReturnR2D2CharacterGivenIdOf2001()
        {
            // When
            var character = await _characterRepository.Get(2001);

            // Then
            Assert.NotNull(character);
            Assert.Equal("R2-D2", character.Name);
        }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        var playerSettingRepository = new PlayerSettingRepository();
        var playerSettingModel      = playerSettingRepository.Get(0);

        var characterRepository = new CharacterRepository();
        var characterModel      = characterRepository.Get(playerSettingModel.CharacterID);

        if (characterModel != null)
        {
            var prefab          = ResourceLoader.LoadCharacterSelectPrefab(characterModel.iconPath);
            var characterObject = Instantiate(prefab);

            characterObject.transform.position   = new Vector3(0, 0.225f, 0);
            characterObject.transform.rotation   = Quaternion.Euler(29.6f, 0, 0);
            characterObject.transform.localScale = Vector3.one * 0.2f;
            characterObject.transform.SetParent(showArea.transform, false);

            var animator = characterObject.GetComponent <Animator>();
            animator.runtimeAnimatorController = controller[characterModel.ID];
        }

        if (GameObject.Find(soundManager.name) == null && soundManager != null)
        {
            GameObject sound = Instantiate(soundManager);
            sound.name = soundManager.name;
        }
    }
    // Use this for initialization
    void Start()
    {
        this.currentTime = 0f;
        this.score       = 0;
        this.updateScore(this.score);
        this.updateTimer();

        this.inGameSceneParameter = SceneMoveManager.Instance.CurrentSceneParameter as InGameSceneParameter;
        if (this.inGameSceneParameter == null)
        {
            var characterRepository  = new CharacterRepository();
            var questGroupRepository = new QuestGroupRepository();
            var questRepository      = new QuestRepository();
            this.inGameSceneParameter = new InGameSceneParameter(
                characterRepository.Get(0),
                questGroupRepository.Get(0),
                questRepository.Get(1001001)
                );
        }

        Instantiate(Resources.Load("InGame/Stage" + this.inGameSceneParameter.QuestGroup.ID));
        GameObject player = (GameObject)Instantiate(Resources.Load("InGame/" + this.inGameSceneParameter.Character.iconPath));

        player.GetComponent <PlayerController>().Init(this.inGameSceneParameter.Character.Type);

        SoundManager.Instance.PlayBgm("vigilante");
    }
예제 #6
0
        public async void ReturnCharacterGivenId()
        {
            var character = await _characterRepository.Get(2001);

            Assert.NotNull(character);
            Assert.Equal("R2-D2", character.Name);
        }
예제 #7
0
        public IHttpActionResult Post(Character_DTO aCharac)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            repo.CreateWithDTO(aCharac);
            Character created_character = repo.Get(aCharac.CharacterName);

            logger.Log("Exiting characterDto.Controller");
            return(Ok(created_character));
        }