Example #1
0
        public void Delete(BCharacterBase chara)
        {
            chara.OnEndActiveE -= ResetValue;
            BCharacterBase.OnEndActiveStaticE -= Resume;

            Destroy(this.gameObject);
        }
Example #2
0
        // Use this for initialization

        public void Start()
        {
            //味方セット
            foreach (var chara in BStageData.Instance.playerCharacters)
            {
                var cha = Instantiate(chara.prefab) as BCharacterPlayer;
                cha.Init(new IntVect2D((int)chara.position.x, (int)chara.position.y));
                characters.Add(cha);
            }
            //敵セット
            foreach (var chara in BStageData.Instance.enemyCharacters)
            {
                var cha = Instantiate(chara.prefab) as BCharacterEnemy;
                cha.Init(new IntVect2D((int)chara.position.x, (int)chara.position.y));
                characters.Add(cha);
            }

            //共通初期化
            foreach (var chara in characters)
            {
                //chara.OnActiveE += SetActiveCharacter;
                //chara.OnEndActiveE += ResetActiveCharacter;
                chara.transform.SetParent(transform);
            }
            activeCharacter = null;
        }
Example #3
0
        public void UpdateUI(BCharacterBase chara)
        {
            var character = chara;

            HPbar.value    = character.characterParameter.HP;
            skillBar.value = character.characterParameter.skillPoint;
        }
Example #4
0
        public void Delete(BCharacterBase chara)
        {
            chara.OnEndActiveE -= ResetValue;
            BCharacterBase.OnEndActiveStaticE -= Resume;

            Destroy(this.gameObject);
        }
Example #5
0
 public void Init(BCharacterBase chara)
 {
     character           = chara;
     activeSpeed         = character.characterParameter.activeSpeed;
     iconImage.sprite    = Resources.Load <Sprite>("ATBIcon/ATB" + character.characterParameter.charaName);
     character.OnDeathE += Delete;
     //slider.maxValue = initTimeValue;
     //nowWaitTime = initTimeValue;
 }
Example #6
0
 public void Init(BCharacterBase chara)
 {
     character = chara;
     activeSpeed = character.characterParameter.activeSpeed;
     iconImage.sprite = Resources.Load<Sprite>("ATBIcon/ATB" + character.characterParameter.charaName);
     character.OnDeathE += Delete;
     //slider.maxValue = initTimeValue;
     //nowWaitTime = initTimeValue;
 }
Example #7
0
 //攻撃選択
 public void OnSlectWaza(BCharacterBase chara, SingleAttackParameter selectWaza)
 {
     ResetAllTileColor();
     //攻撃範囲取得
     foreach (var range in selectWaza.attackRanges)
     {
         var pos = IntVect2D.Clone(chara.positionArray);
         pos = IntVect2D.Add(pos, range);
         ChangeColor(pos, TileState.Attack);
     }
 }
        public void Init(BCharacterBase _character)
        {
            var character = _character;
            var objectType= character.isEnemy==false?"Player":"Enemy";
            transform.SetParent(GameObject.FindGameObjectWithTag("CharacterStateUIParent").transform.FindChild(objectType).transform, false);
            character.OnDeathE += Delete;
            character.OnStatusUpdateE += UpdateUI;

            faceImage.sprite = Resources.Load<Sprite>("StatusUIIcon/Status" + _character.characterParameter.charaName);
            HPbar.maxValue = _character.characterParameter.HP;
            skillBar.maxValue = _character.characterParameter.skillPoint;
            UpdateUI(character);
        }
Example #9
0
        public void Init(BCharacterBase _character)
        {
            var character  = _character;
            var objectType = character.isEnemy == false?"Player":"Enemy";

            transform.SetParent(GameObject.FindGameObjectWithTag("CharacterStateUIParent").transform.FindChild(objectType).transform, false);
            character.OnDeathE        += Delete;
            character.OnStatusUpdateE += UpdateUI;

            faceImage.sprite  = Resources.Load <Sprite>("StatusUIIcon/Status" + _character.characterParameter.charaName);
            HPbar.maxValue    = _character.characterParameter.HP;
            skillBar.maxValue = _character.characterParameter.skillPoint;
            UpdateUI(character);
        }
Example #10
0
 public void SetActivePlayer(BCharacterPlayer chara)
 {
     activePlayer    = chara;
     activeCharacter = chara;
 }
Example #11
0
 void Start()
 {
     character = GetComponent<BCharacterBase>();
     animator = GetComponent<BCharacterAnimator>();
 }
Example #12
0
 //アクティブ時
 public void OnActiveCharacter(BCharacterBase chara)
 {
     ResetAllTileColor();
 }
 // Use this for initialization
 public void Awake()
 {
     character = GetComponent<BCharacterBase>();
     animator = GetComponent<BCharacterAnimator>();
 }
Example #14
0
 // Use this for initialization
 public virtual void Awake()
 {
     character = GetComponent <BCharacterBase>();
     animator  = GetComponent <BCharacterAnimator>();
 }
Example #15
0
 //行動終了とActiveTime再開
 public void ResetValue(BCharacterBase _activeCharacter)
 {
     NowWaitTime = minOneCycleValue;
 }
Example #16
0
 public void UpdateUI(BCharacterBase chara)
 {
     var character = chara;
     HPbar.value = character.characterParameter.HP;
     skillBar.value = character.characterParameter.skillPoint;
 }
Example #17
0
 public void Remove(BCharacterBase chara)
 {
     characters.Remove(chara);
 }
Example #18
0
 public void Delete(BCharacterBase chara)
 {
     Destroy(this.gameObject);
 }
Example #19
0
 public void ResetActiveCharacter()
 {
     activeCharacter = null;
     activePlayer    = null;
 }
Example #20
0
 public void Add(BCharacterBase chara)
 {
     characters.Add(chara);
 }
Example #21
0
 public void Delete(BCharacterBase chara)
 {
     Destroy(this.gameObject);
 }
Example #22
0
 public void SetActiveCharacter(BCharacterBase _activeCharacter)
 {
     activeCharacter = _activeCharacter;
     MoveToBackForActive();
 }
 void Start()
 {
     character = GetComponent <BCharacterBase>();
     animator  = GetComponent <BCharacterAnimator>();
 }
Example #24
0
 public void UpdateUI(BCharacterBase chara)
 {
     commandParent.SetActive(true);
     commandScript.UpdateUI();
 }
Example #25
0
 //行動終了とActiveTime再開
 public void ResetValue(BCharacterBase _activeCharacter)
 {
     NowWaitTime = minOneCycleValue;
 }
Example #26
0
 public void DisableActiveCharacter()
 {
     activeCharacter = null;
     MoveToLeanForWait();
 }
Example #27
0
 public void SetActiveEnemy(BCharacterEnemy chara)
 {
     activeCharacter = chara;
 }