public MapEventEnemy(List <string> enemies, Map map, SirokoStats status) { this.enemies = enemies; this.status = status; this.eventType = EventType.ENEMY; this.map = map; }
//戦闘結果をステータスに反映する void applyBattleStateToStatus() { SirokoStats status = FindObjectOfType <SirokoStats>(); //TODO アイテムをMonobehaviour依存のないクラスにまとめる status.items = new List <string>(); foreach (BattleItem item in items) { status.items.Add(item.item.itemName); } status.mp = player.mp; status.hp = player.hp; status.addTurnCount(turnCount); //reward回収 foreach (BattleReward reward in rewards.rewards) { switch (reward.rewardType) { case BattleReward.RewardType.GOLD: status.gold += reward.amount; break; case BattleReward.RewardType.EQUIP: Debug.Log("装備落とすのは未実装"); break; case BattleReward.RewardType.ITEM: Debug.Log("アイテム落とすのは未実装"); break; } } }
public void addActionUnInteractable(string actionName) { if (!status) { status = FindObjectOfType <SirokoStats>(); } ActionButton created = Instantiate(actionButtonPrefab, contents.transform); Action a = ActionStore.getActionByName(actionName); created.actionName.text = actionName; created.backgroundImage.color = getRarityColor(a.rarity); created.mp.text = a.cost.ToString(); created.wt.text = ((int)(a.waitTime * BattleCharacter.getDefaultWaitTimeCutRate(status.getSpeedLevel()))).ToString(); if (a.effectList.Exists(x => x.hasAttribute(Effect.Attribute.MAGIC))) { created.actionTypeImage.sprite = rod; } else { created.actionTypeImage.sprite = spear; } created.messageArea = messageArea; actionbuttons.Add(created); }
public MapEventGold(int amount, SirokoStats status, Map map) { this.amount = amount; this.status = status; this.eventType = EventType.GOLD; this.map = map; }
// Use this for initialization void Start() { status = FindObjectOfType <SirokoStats>(); initialize(); battleModel.setLoadFinished(); battleModel.onTurnStart();//こっち側で設定が終わったのでバトルを開始する }
public void findStatus() { if (!status) { status = FindObjectOfType <SirokoStats>(); } }
// Use this for initialization void Start() { status = FindObjectOfType <SirokoStats>(); if (!status) { Debug.LogWarning("ステータス掴みそこねた"); } refresh(); }
public MapEventTreasure(SirokoStats status, Map map, TreasureType treasureType, string treasureName, DialogMenu dialog) { this.status = status; this.map = map; this.eventType = EventType.TREASURE; this.treasureType = treasureType; this.treasureName = treasureName; this.dialog = dialog; }
public void refresh() { if (!status) { status = FindObjectOfType <SirokoStats>(); } leftHand.refresh(); rightHand.refresh(); goldText.numerate(status.gold); }
public void refresh() { if (!status) { status = FindObjectOfType <SirokoStats>(); } updateGold(); updateActionsArea(); updateEquips(); updateParameters(); updateTotalLevel(); }
public void loadStatusData() { SirokoStats s = FindObjectOfType <SirokoStats>(); if (s == null) { Debug.LogWarning("ステータス掴みそこねた"); } else { status = s; } }
public void loadStatusData() { SirokoStats s = FindObjectOfType <SirokoStats>(); if (s == null) { status = Instantiate(status_default); DontDestroyOnLoad(s); } else { status = s; } }
// Use this for initialization void Start() { siroko = FindObjectOfType <SirokoStats>(); if (!siroko) { siroko = Instantiate <SirokoStats>(sirokoPrefab); } siroko.strength = (int)strength.value; siroko.intelligence = (int)intelligence.value; siroko.magicCapacity = (int)magicCapacity.value; siroko.speed = (int)speed.value; siroko.defence = (int)defence.value; siroko.vitality = (int)vitality.value; setDefaultBattleData(); }
// Use this for initialization void Start() { congratsTimer = 0; status = FindObjectOfType <SirokoStats>(); if (!status) { Debug.LogWarning("ステータスないよ 直接起動した?"); return; } goldReturn.numerate(status.gold); turnCount.numerate(status.clock); updateRanks(); }
// Use this for initialization void Start() { leftHand.setShopLineup(new List <string>() { "高揚", "大鎌", "凍結" }, StoreAreaComponent.ItemKind.ACTION); rightHand.setShopLineup(new List <string>() { "さんかく帽子", "霊気の鎧", "闇" }, StoreAreaComponent.ItemKind.EQUIP); status = FindObjectOfType <SirokoStats>(); goldText.numerate(status.gold); if (!status) { Debug.LogError("ステータス掴みそこねた(ストアメニュー)"); } refresh(); }
public bool canBuyThis() { //もう買ってると買えない if (isBought) { return(false); } //お金が足りないと買えない SirokoStats status = GameObject.FindObjectOfType <SirokoStats>(); if (!status) { Debug.LogError("status掴みそこねた(ストアアイテム)"); } if (status.gold < cost) { return(false); } return(true); }
public StoreAreaComponentAction parentComponent; //アウトレット接続する public new void buy() { SirokoStats status = FindObjectOfType <SirokoStats>(); if (!status) { Debug.LogError("買おうとしたけどステータスない"); return; } if (canBuyThis()) { status.buy(kind, itemName, cost); //アクションは一つしか買えないので、アクションボタン全体のisBoughtにチェックを入れていく parentComponent.notifyActionIsBoughtToChildren(); refresh(); storeMenu.refresh(); } else { Debug.Log("カエナイヨ"); } }
public void buy() { SirokoStats status = FindObjectOfType <SirokoStats>(); if (!status) { Debug.LogError("買おうとしたけどステータスない"); return; } if (canBuyThis()) { soundsController.playUICoin(); status.buy(kind, itemName, cost); isBought = true; refresh(); storeMenu.refresh(); } else { Debug.Log("カエナイヨ"); } }
// Use this for initialization void Start() { status = FindObjectOfType <SirokoStats>(); }
// Use this for initialization void Start() { //読み込み順バグを避けるためにBattleSceneConstructor側でloadactionsを呼ぶことにしました //loadActions(); status = FindObjectOfType <SirokoStats>(); }