コード例 #1
0
        /// <summary>
        /// ロード
        /// </summary>
        public void Load(Action onLoaded)
        {
            //アイコンスプライト
            string spritePath = SharkDefine.GetBattleItemIconSpritePath(this.itemMaster.key);

            this.loader.Add <Sprite>(spritePath);

            //アイテム使用時SE
            var item = this.skillGroupManager.Find(x => x is SkillBattleItemBase) as SkillBattleItemBase;

            if (item != null)
            {
                this.loader.Add <AudioClip>(SharkDefine.GetSeClipPath(item.seName));
            }

            //ロード
            this.loader.Load(onLoaded);
        }
コード例 #2
0
        /// <summary>
        /// Start
        /// </summary>
        private void Start()
        {
            //アイコンスプライトセット
            string spritePath = SharkDefine.GetBattleItemIconSpritePath(this.itemMaster.key);

            this.icon.iconImage.enabled = true;
            this.icon.SetIconSprite(this.loader[spritePath].handle.asset as Sprite);

            //所持数テキスト更新
            this.RefleshStockCountText();

            //ボタンの有効無効更新
            this.RefleshButtonInteractable();

            //スキルによるアイテム再使用間隔の短縮
            float shortenCoolTime = BattleGlobal.instance.userData.skill.ShortenCoolTime();

            //Debug.LogFormat("アイテムID{0}:{1} 再使用間隔{2}秒。スキル効果で{3}秒短縮します。", this.itemMaster.id, this.itemMaster.name, this.maxCoolTime, shortenCoolTime);
            this.maxCoolTime = Mathf.Max(0f, this.maxCoolTime - shortenCoolTime);
        }
コード例 #3
0
 string IItemInfo.GetSpritePath() => SharkDefine.GetBattleItemIconSpritePath(this.key);
コード例 #4
0
 public override string GetSpritePath(string key)
 {
     return(SharkDefine.GetBattleItemIconSpritePath(key));
 }