public void Delete(BCharacterBase chara) { chara.OnEndActiveE -= ResetValue; BCharacterBase.OnEndActiveStaticE -= Resume; Destroy(this.gameObject); }
// 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; }
public void UpdateUI(BCharacterBase chara) { var character = chara; HPbar.value = character.characterParameter.HP; skillBar.value = character.characterParameter.skillPoint; }
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; }
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; }
//攻撃選択 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); }
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); }
public void SetActivePlayer(BCharacterPlayer chara) { activePlayer = chara; activeCharacter = chara; }
void Start() { character = GetComponent<BCharacterBase>(); animator = GetComponent<BCharacterAnimator>(); }
//アクティブ時 public void OnActiveCharacter(BCharacterBase chara) { ResetAllTileColor(); }
// Use this for initialization public void Awake() { character = GetComponent<BCharacterBase>(); animator = GetComponent<BCharacterAnimator>(); }
// Use this for initialization public virtual void Awake() { character = GetComponent <BCharacterBase>(); animator = GetComponent <BCharacterAnimator>(); }
//行動終了とActiveTime再開 public void ResetValue(BCharacterBase _activeCharacter) { NowWaitTime = minOneCycleValue; }
public void Remove(BCharacterBase chara) { characters.Remove(chara); }
public void Delete(BCharacterBase chara) { Destroy(this.gameObject); }
public void ResetActiveCharacter() { activeCharacter = null; activePlayer = null; }
public void Add(BCharacterBase chara) { characters.Add(chara); }
public void SetActiveCharacter(BCharacterBase _activeCharacter) { activeCharacter = _activeCharacter; MoveToBackForActive(); }
void Start() { character = GetComponent <BCharacterBase>(); animator = GetComponent <BCharacterAnimator>(); }
public void UpdateUI(BCharacterBase chara) { commandParent.SetActive(true); commandScript.UpdateUI(); }
public void DisableActiveCharacter() { activeCharacter = null; MoveToLeanForWait(); }
public void SetActiveEnemy(BCharacterEnemy chara) { activeCharacter = chara; }