Example #1
0
    /// <summary>
    /// 鼠标离开技能
    /// </summary>
    /// <param name="param"></param>
    private void ExitSkill(object param)
    {
        GameObject skill     = (GameObject)param;
        SkillView  skillView = skill.GetComponent <SkillView>();

        skillView.skill_info.SetActive(false);
    }
    public void InitSkills()
    {
        int index = 0;

        foreach (var skill in SkillManager.singleton.lockedSkills)
        {
            XUIListItem skillItem = null;
            if (index < this.m_List_SkillItems.Count)
            {
                skillItem = this.m_List_SkillItems.GetItemByIndex(index);
            }
            else
            {
                skillItem = this.m_List_SkillItems.AddListItem();
            }
            if (skillItem != null)
            {
                skillItem.Id = skill.skillConfig.skillId;
                SkillView skillView = skillItem.GetComponent <SkillView>();
                skillView.skillIcon.sprite = WWWResourceManager.Instance.LoadSpriteFormAtla("common1.ab", skill.skillConfig.iconPath);
                skillView.SetSkillNameAndId(skill.skillConfig.skillId);
                this.skills.Add(skill.skillConfig.skillId, skillView);
            }
            index++;
        }
    }
Example #3
0
    /// <summary>
    /// 显示技能剩余时间
    /// </summary>
    private void ShowSkillColdTime()
    {
        long lastTime = 0;

        if (LocalUser.Instance.Camp == (int)Camp.Bright)
        {
            lastTime = DateTime.Now.Ticks / 10000000 - BrightStartTime;
        }
        else
        {
            lastTime = DateTime.Now.Ticks / 10000000 - DarkStartTime;
        }
        long remainderTime = Constant.skill_1_Cold - lastTime;

        GameObject[] skills = GameObject.FindGameObjectsWithTag("SKILL");
        foreach (GameObject skill in skills)
        {
            SkillView skillView = skill.GetComponent <SkillView>();
            if (remainderTime >= 0)
            {
                int _time = (int)remainderTime;
                skillView.skill_coldTime.text = _time.ToString();
                StartCoroutine(Wait());
            }
            else
            {
                skillView.skill_coldTime.text = "";
                isUsedSkill = false;
            }
        }
    }
Example #4
0
    public void Create(Creature ac, FightGridView fgv)
    {
        m_crt               = ac;
        m_crt.OnDead       += OnDead;
        m_crt.OnTakeDamage += OnTakeDamage;

        m_fgv = fgv;

        m_rt           = gameObject.GetComponent <RectTransform>();
        m_rt.sizeDelta = new Vector2(Info.Proto.Dim.X * FightGrid.UnitSize, Info.Proto.Dim.Y * FightGrid.UnitSize);

        m_anim_ctl = gameObject.GetComponent <Animator>();
        //m_anim_ctl = gameObject.GetComponent<Animation>();
        //m_anim_ctl.AddClip(ResMgr.Instance.Load("Anim/Die") as AnimationClip, "Die");
        //m_anim_ctl.AddClip(ResMgr.Instance.Load("Anim/Cast") as AnimationClip, "Cast");
        //m_anim_ctl.AddClip(ResMgr.Instance.Load("Anim/BeHit") as AnimationClip, "BeHit");

        TxtName.text = Info.Proto.Key;

        GameObject prog_hp = ResMgr.Instance.CreateGameObject("UI/CrtProg", gameObject);

        m_prog = prog_hp.GetComponent <CreatureViewProg>();
        m_prog.Create(this);

        for (int i = 0; i < Crt.Skills.Count; ++i)
        {
            SkillView sk = ResMgr.Instance.CreateGameObject("Skill/" + Crt.Skills[i].Proto.Key, gameObject).GetComponent <SkillView>();
            sk.Create(Crt.Skills[i], this);
            m_skill_views.Add(sk);

            Crt.Skills[i].OnCast += OnCast;
        }

        Idle();
    }
Example #5
0
    public IEnumerator SelectSkill(IEnumerable <Skill> skills)
    {
        while (ButtonsRoot.transform.childCount > 0)
        {
            var go = ButtonsRoot.transform.GetChild(0).gameObject;
            go.transform.SetParent(null);
            Destroy(go);
        }

        foreach (var skill in skills)
        {
            var buttonInst = Instantiate(SubmitButtonPrefab);
            buttonInst.transform.SetParent(ButtonsRoot.transform);
            var submitButton = buttonInst.GetComponent <SkillSubmitButton>();
            submitButton.IconTarget.sprite = IconDatabase.GetIcon(skill);
            submitButton.Panel             = this;
            submitButton.Skill             = Root.AllSkills.FirstOrDefault(view => view.Model <Skill>() == skill);
        }

        SelectedSkill  = null;
        mSkillSubmited = false;
        gameObject.SetActive(true);
        yield return(new WaitUntil(() => mSkillSubmited));

        gameObject.SetActive(false);
    }
Example #6
0
    /// <summary>
    /// 在技能上停留显示技能详细信息
    /// </summary>
    /// <param name="param"></param>
    private void StayOnSkill(object param)
    {
        GameObject skill     = (GameObject)param;
        SkillView  skillView = skill.GetComponent <SkillView>();

        skillView.skill_info.SetActive(true);
    }
Example #7
0
 void OnEnable()
 {
     skillView = target as SkillView;
     startGo   = serializedObject.FindProperty("startGo");
     targetGo  = serializedObject.FindProperty("targetGo");
     skillGo   = serializedObject.FindProperty("skillGo");
     buffGo    = serializedObject.FindProperty("buffGo");
 }
Example #8
0
	void OnEnable()
	{
		skillView = target as SkillView;
		startGo = serializedObject.FindProperty("startGo");
		targetGo = serializedObject.FindProperty("targetGo");
		skillGo = serializedObject.FindProperty("skillGo");
		buffGo = serializedObject.FindProperty("buffGo");
	}
Example #9
0
    public virtual void Create(EffectBase effect, SkillView sv)
    {
        m_effect = effect;
        m_owner  = sv;

        Effect.OnActive        += OnActive;
        Effect.OnActivePrepare += OnActivePrepare;
        Effect.OnActiveOver    += OnActiveOver;
    }
        void AddSkill_Clicked(object sender, System.EventArgs e)
        {
            if (SkillEntry.Text != "")
            {
                var lab = new SkillView(SkillEntry.Text);

                this.SkillsLayout.Children.Add(lab);
                SkillEntry.Text = "";
            }
        }
Example #11
0
 public CharacterView(CharacterManager characterManager, SkillManager skillManager, HomeView homeview, SkillView skillview)
 {
     controller                  = new LearnSkillController(skillManager, characterManager);
     this.characterManager       = characterManager;
     this.skillManager           = skillManager;
     this.skillview              = skillview;
     this.homeview               = homeview;
     homeview.CallCharacterView += CharacterCreation;
     homeview.CallLearnSKill    += LearnSkillView;
 }
        public override void Execute(object parameter)
        {
            SkillView skillView = new SkillView(WarriorView);

            Window window = new Window()
            {
                Content = skillView
            };

            window.ShowDialog();
        }
Example #13
0
 private object OpenSkillView(params object[] objs)
 {
     if (skillView == null)
     {
         skillView = new SkillView();
     }
     else
     {
         skillView.Show();
     }
     return(null);
 }
Example #14
0
	public void InsertSkillInfoData( SkillView _skill)
	{
		UIListItem item = list.CreateItem( objSkillItem) as UIListItem;
		
		AsBaseSkillItem baseSkillItem = item.gameObject.GetComponent<AsBaseSkillItem>();
		if( null == baseSkillItem)
			return;
		
		baseSkillItem.position = eSkillPosition.SkillBook;
		baseSkillItem.price = 0;
//		baseSkillItem.List = list;
		baseSkillItem.Init( _skill, SkillBook.Instance.newdicActive.ContainsKey( _skill.nSkillTableIdx ) );		
	}
        public IActionResult SaveSkillView([FromBody] SkillView sv)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var id = _skillRepository.SaveSkillView(sv);

            var res = _skillRepository.GetSkillViewById(id);

            return(Ok(res));
        }
Example #16
0
	public void InsertSkillInfoData( SkillView _skill)
	{
		UIListItem item = list.CreateItem( objSkillItem) as UIListItem;
		
		AsBaseSkillItem baseSkillItem = item.gameObject.GetComponent<AsBaseSkillItem>();
		if( null == baseSkillItem)
			return;
		
		baseSkillItem.position = eSkillPosition.SkillBook;
		baseSkillItem.price = 0;
//		baseSkillItem.List = list;
		baseSkillItem.Init( _skill, false);
	}
 public void SetCD(int skillId)
 {
     if (skillId > 0 && this.skills.Count > 0)
     {
         SkillView     skillItem = this.skills[skillId];
         GameSkillBase skill     = SkillManager.singleton.GetSkill(skillId);
         float         cd        = skill.skillConfig.cds[skill.level - 1].cd;
         if (skillItem != null)
         {
             skillItem.SetActiveMask(true);
             skillItem.SetFillAmount(1f);
             skillItem.StartTweenCD(cd);
             skillItem.StartCDTextNumTimer(cd);
         }
     }
 }
Example #18
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(120, 40);
            GameLoop           game               = new GameLoop();
            HomeView           homeview           = new HomeView();
            SkillEffectManager skillEffectManager = new SkillEffectManager();
            SkillManager       skillManager       = new SkillManager();
            SkillEffectView    skillEffectView    = new SkillEffectView(homeview, skillEffectManager);
            CharacterManager   characterManager   = new CharacterManager();
            SkillView          skillView          = new SkillView(homeview, skillManager, skillEffectManager, skillEffectView);
            CharacterView      characterView      = new CharacterView(characterManager, skillManager, homeview, skillView);
            BattleController   battleController   = new BattleController();
            BattleView         battleView         = new BattleView(homeview, characterView, battleController, characterManager);

            homeview.ShowListFunction();
            Console.ReadKey();
        }
Example #19
0
	public void InsertSkillInfoData( SkillView _skill, bool flag)
	{
		AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity();
		int userLevel = userEntity.GetProperty<int>( eComponentProperty.LEVEL);
		Tbl_SkillLevel_Record skillLevelRecord = AsTableManager.Instance.GetTbl_SkillLevel_Record( _skill.nSkillLevel, _skill.nSkillTableIdx);
		if( ( true == flag) && ( ( userLevel < skillLevelRecord.Level_Limit) || ( AsUserInfo.Instance.SavedCharStat.nGold < (ulong)_skill.getSkillRecord.SkillShop_BuyAmount)))
			return;
		
		UIListItem item = list.CreateItem( objBaseSkillItem) as UIListItem;
		
		AsBaseSkillItem baseSkillItem = item.gameObject.GetComponent<AsBaseSkillItem>();
		if( null == baseSkillItem)
			return;
		
		baseSkillItem.position = eSkillPosition.SkillShop;
		baseSkillItem.price = _skill.getSkillRecord.SkillShop_BuyAmount;
		baseSkillItem.Init( _skill, false);
	}
Example #20
0
    // Use this for initialization
    public void Init()
    {
        UIPackage.AddPackage("FairyGUI/UIMain");
        UIObjectFactory.SetPackageItemExtension("ui://UIMain/BuildItem", typeof(BuildItem));
        UIObjectFactory.SetPackageItemExtension("ui://UIMain/SkillItem", typeof(SkillItem));

        UIObjectFactory.SetPackageItemExtension("ui://UIMain/DetailPanel", typeof(BuildDetail));

        UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerDamageItem", typeof(TowerDamageItem));
        UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerSkillItem", typeof(TowerSkillItem));
        _mainView = this.GetComponent <UIPanel> ().ui;
        _joystick = new JoystickManager(_mainView);
        _joystick.onMove.Add(handleMove);
        _joystick.onEnd.Add(handleMoveEnd);


        _skillView = new SkillView(_mainView);
        _buildBtn  = _mainView.GetChild("build").asCom;
        _buildWin  = new BuildWindow();
        _hp_bar    = _mainView.GetChild("hpBar").asCom;
        _buildBtn.onClick.Add(() => { _buildWin.Show(); });

        _potions [0] = _mainView.GetChild("potion_0").asCom;
        _potions [1] = _mainView.GetChild("potion_1").asCom;
        _potions [2] = _mainView.GetChild("potion_2").asCom;
        for (int i = 0; i < 3; i++)
        {
            int ii = i;
            _potions [i].onTouchBegin.Add(delegate() {
                BattleManager.getInstance().useItem(ii);
            });
        }
        _battleFinishWindow = new BattleFinishWindow();


        GRoot.inst.onSizeChanged.Add(onWindowResize);
        BuildButtonPosInScreen = GRoot.inst.LocalToGlobal(_buildBtn.position);

        _enemy_left = _mainView.GetChild("enemy_left").asTextField;

        _coins0 = _mainView.GetChild("coins0").asTextField;
        _coins1 = _mainView.GetChild("coins1").asTextField;
        _coins2 = _mainView.GetChild("coins2").asTextField;
    }
Example #21
0
    /// <summary>
    /// 加载技能
    /// </summary>
    private void LoadSkills()
    {
        GameObject[] _skills = GameObject.FindGameObjectsWithTag("SKILL");
        int          i       = 1;

        foreach (GameObject _skill in _skills)
        {
            SkillView skillView  = _skill.GetComponent <SkillView>();
            Skill     skill_temp = null;
            if (skills.TryGetValue(i, out skill_temp) == true)
            {
                skillView.skill_img.sprite     = skill_temp.Img;
                skillView.skill_name.text      = skill_temp.Name;
                skillView.skill_info_text.text = skill_temp.Info;
                skillView.skillEnum            = skill_temp.SkillEnum;
            }
            i++;
        }
    }
Example #22
0
        public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
        {
            skillMap = SkillLoader.load();

            SkillView              = new SkillView(this);
            ACTTabControl          = new ACTTabControl(this);
            pluginScreenSpace.Text = Assembly.GetExecutingAssembly().GetName().Name;
            pluginScreenSpace.Controls.Add(ACTTabControl);
            ACTTabControl.InitializeSettings();

            Settings = new DataManager(this);
            Settings.Load();

            ACTTabControl.Show();
            ACTTabControl.ReloadSkillRotation();

            ActGlobals.oFormActMain.OnCombatStart += CombatStarted;
            ActGlobals.oFormActMain.OnCombatEnd   += CombatEnded;
            ActGlobals.oFormActMain.OnLogLineRead += OnLogLineRead;
        }
        public void UpdateSkillStudy()
        {
            Units         player       = PlayerControlMgr.Instance.GetPlayer();
            SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(player.npc_id);

            string[] heroSkills = heroMainData.skill_id.Split(new char[]
            {
                ','
            });
            GridHelper.FillGrid <SkillShowItem>(this.mSkillGird, this.mSkillItem, (heroSkills.Length <= 4) ? heroSkills.Length : 4, delegate(int idx, SkillShowItem comp)
            {
                SysSkillMainVo skillData = SkillUtility.GetSkillData(heroSkills[idx], -1, -1);
                Texture textue           = null;
                string type   = (skillData.skill_trigger != 3) ? "(主动)" : "(被动)";
                string unikey = skillData.skill_id + "_lv0" + ((player.getSkillById(skillData.skill_id).skillLevel != 0) ? player.getSkillById(skillData.skill_id).skillLevel : 1).ToString();
                SysSkillLevelupVo dataById = BaseDataMgr.instance.GetDataById <SysSkillLevelupVo>(unikey);
                comp.Init(textue, skillData.skill_name, type, SkillView.FixSkillTxtInfo(BaseDataMgr.instance.GetLanguageData(dataById.skill_description).content, player), !player.skillManager.IsSkillUnlock(skillData.skill_id), (dataById.cd / (1f + player.GetAttr(AttrType.NormalSkillCooling))).ToString("0.0"));
            });
            this.mSkillGird.Reposition();
        }
Example #24
0
    /// <summary>
    /// 点击技能按钮
    /// </summary>
    /// <param name="param"></param>
    private void ClickSkill(object param)
    {
        GameObject skillGameObject = (GameObject)param;
        SkillView  skill           = skillGameObject.GetComponent <SkillView>();
        var        message         = new mmopb.useSkill_req();

        if (!isUsedSkill)
        {
            if (skill.skillEnum == SkillEnum.SpeedUp)
            {
                audioSource.clip = speedUP;
            }
            if (skill.skillEnum == SkillEnum.Stop)
            {
                audioSource.clip = speedDown;
            }
            audioSource.Play();
            message.skillType = Convert.ToInt32(skill.skillEnum);
            ClientNet.Instance.Send(ProtoBuf.ProtoHelper.EncodeWithName(message));
        }
    }
Example #25
0
 private void FillSkillLevel(Skill p_skill, TooltipType p_type, Boolean p_isDefault)
 {
     if (p_type == TooltipType.PARTY_CREATION)
     {
         if (p_skill.MaxTier == ETier.NONE)
         {
             m_level.UpdateText(LocaManager.GetText("TOOLTIP_SKILL_CANNOT_LEARN"));
         }
         else
         {
             String p_text;
             if (p_skill.Tier == ETier.NONE)
             {
                 p_text = LocaManager.GetText("TOOLTIP_SKILL_UNSELECTED");
             }
             else
             {
                 p_text = "[00ff00]" + LocaManager.GetText("TOOLTIP_SKILL_SELECTED") + "[-]";
             }
             m_level.UpdateText(p_text);
         }
     }
     else if (p_skill.Tier == ETier.NONE)
     {
         m_level.UpdateText(LocaManager.GetText("GUI_SKILLS_LEVEL_DESCRIPTION_UNLEARNED"));
     }
     else
     {
         String arg;
         if (p_skill.VirtualSkillLevel > 0)
         {
             arg = m_effectColorHex + (p_skill.Level + p_skill.VirtualSkillLevel) + "[-]";
         }
         else
         {
             arg = p_skill.Level.ToString();
         }
         m_level.UpdateText(LocaManager.GetText("TT_SKILL_LEVEL", SkillView.GetTierText(p_skill.Tier), arg));
     }
 }
Example #26
0
 private void GenerateView()
 {
     this.View                      = new SkillView();
     this.View.DataContext          = this;
     View.SkillLaunchButton.Content = Skill.Name;
 }
Example #27
0
	public void AddLearnSkill(body_SC_SKILL_LEARN_RESULT _learn)
	{
//		eCLASS __class = AsUserInfo.Instance.GetCurrentUserEntity().GetProperty<eCLASS>(eComponentProperty.CLASS);
		SkillView view = new SkillView(_learn.sSkill.nSkillTableIdx, _learn.sSkill.nSkillLevel);
//		view.SetSkillBookRecordByClass(__class);
		
		Tbl_Skill_Record record = AsTableManager.Instance.GetTbl_Skill_Record(view.nSkillTableIdx);
		if(record.Skill_Type == eSKILL_TYPE.Base)
			return;
		
		if(m_dicCurSkill.ContainsKey(_learn.sSkill.nSkillTableIdx) == true)
		{
			m_dicCurSkill.Remove(_learn.sSkill.nSkillTableIdx);
		}
		m_dicCurSkill.Add(_learn.sSkill.nSkillTableIdx, view);
		SortCurSkill();
		
		if(m_dicNotSetting.ContainsKey(_learn.sSkill.nSkillTableIdx) == true)
		{
			m_dicNotSetting.Remove(_learn.sSkill.nSkillTableIdx);
		}
		m_dicNotSetting.Add(_learn.sSkill.nSkillTableIdx, view);
		SortNotSetting();
		
		//	add resettedSkills
		if( AsUserInfo.Instance.resettedSkills.ContainsKey( _learn.nSkillBookIdx ) == false )
		{
			body2_SC_SKILLBOOK_LIST _skillBookList = new body2_SC_SKILLBOOK_LIST();
			_skillBookList.nSkillBookTableIdx = _learn.nSkillBookIdx;
			AsUserInfo.Instance.resettedSkills.Add( _learn.nSkillBookIdx , _skillBookList);
		}
		
		AddSkillByType(view, true);
		
		if( record.Skill_Type != eSKILL_TYPE.Command && record.Skill_Type != eSKILL_TYPE.Passive )
			ItemMgr.HadItemManagement.QuickSlot.SetLearnSkill( _learn.sSkill.nSkillTableIdx, _learn.sSkill.nSkillLevel );
		
		if(AsHudDlgMgr.Instance.IsOpenedSkillBook == true)
		{
			ResetDicNotSettingData();
			AsHudDlgMgr.Instance.skillBookDlg.RefreshSkillBookDlg();			
		}
	}
Example #28
0
	public void Init( SkillView skill, bool isNew )
	{
		skillInfo = skill;
		
		if( eSkillPosition.SkillShop == position)
			slot.gameObject.collider.enabled = false;
		
		slot.SetSkillIcon( skill.nSkillTableIdx, skill.nSkillLevel);
		skillRecord = AsTableManager.Instance.GetTbl_Skill_Record( skill.nSkillTableIdx);
		if( null == skillRecord)
		{
			Debug.LogError( "null == skillRecord");
			return;
		}
		
		skillLevelRecord = AsTableManager.Instance.GetTbl_SkillLevel_Record( skill.nSkillLevel, skill.nSkillTableIdx);
		if( null == skillLevelRecord)
		{
			Debug.LogError( "null == skillLevelRecord");
			return;
		}

		UIListItem item = gameObject.GetComponent<UIListItem>();
		item.spriteText = desc;

		StringBuilder sb = new StringBuilder();
		
		switch( position)
		{
		case eSkillPosition.SkillShop:
			desc.transform.localPosition = new Vector3( 6.92458f, 1.524059f, -0.5f);
			desc.characterSize = 1;
			desc.anchor = SpriteText.Anchor_Pos.Upper_Right;
			desc.alignment = SpriteText.Alignment_Type.Right;

			AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity();
			int userLevel = userEntity.GetProperty<int>( eComponentProperty.LEVEL);
			string format = defaultColor.ToString() + "{0} Lv.{1}\n";
			if( userLevel < skillLevelRecord.Level_Limit)
				format += deficientColor.ToString();
			format += AsTableManager.Instance.GetTbl_String(134) + " {2}\n";
			
			if( ( true == AsUserInfo.Instance.resettedSkills.ContainsKey( skill.getSkillRecord.Index))
				|| ( true == AsUserInfo.Instance.resettedSkills.ContainsKey( skill.getSkillRecord.CoupleIndex)))
			{
				format += ( goldColor.ToString() + "0");
				
				sb.AppendFormat( format, AsTableManager.Instance.GetTbl_String( skillRecord.SkillName_Index),
					skill.nSkillLevel, skillLevelRecord.Level_Limit);
			}
			else
			{
				if( AsUserInfo.Instance.SavedCharStat.nGold < (ulong)price)
					format += ( deficientColor.ToString() + "{3}");
				else
					format += ( goldColor.ToString() + "{3}");
	
				sb.AppendFormat( format, AsTableManager.Instance.GetTbl_String( skillRecord.SkillName_Index),
					skill.nSkillLevel, skillLevelRecord.Level_Limit, price.ToString( "#,#0", CultureInfo.InvariantCulture));
			}
			break;
			
		case eSkillPosition.SkillBook:
			
			//	skill reset cost button
			Vector3	descPos;
			if( skillRecord.SkillReset == eSkillReset.Enable && skillRecord.SkillResetCost >= 0 )
			{
				btnReset.gameObject.SetActive(true);
				btnReset.SetInputDelegate(ResetBtnDelegate);
				btnResetUp.SetInputDelegate(ResetBtnDelegate);
				textResetDesc.Text = AsTableManager.Instance.GetTbl_String(1221);
				textResetCost.Text = skillRecord.SkillResetCost.ToString();
			}
			else
			{
				btnReset.gameObject.SetActive(false);
			}
			
			descPos = new Vector3( -4.641596f , 0.0f, -0.5f);
			desc.transform.localPosition = descPos;
			desc.characterSize = 2;
			desc.anchor = SpriteText.Anchor_Pos.Middle_Left;
			
			desc.alignment = SpriteText.Alignment_Type.Center;

			sb.AppendFormat( "{0} Lv.{1}", AsTableManager.Instance.GetTbl_String( skillRecord.SkillName_Index), skill.nSkillLevel);
			break;
		}

		desc.Text = sb.ToString();
		
		UISlotItem slotItem = slot.getIcon.GetComponent<UISlotItem>();
		if( null == slotItem)
		{
			Debug.LogError( "null == slotItem");
			return;
		}
		GameObject.DestroyImmediate( slotItem.coolTime.gameObject);
		GameObject.DestroyImmediate( slotItem.itemCountText.gameObject);
		slotItem.iconImg.renderer.enabled = false;
		item.layers[0] = slotItem.iconImg;
		
		if( isNew )
		{			
			GameObject obj = ResourceLoad.CreateUI( "UI/AsGUI/GUI_NewImg", slotItem.iconImg.transform, new Vector3(0f, 1f, -0.1f ) );
			if( null == obj )
				return;
			SimpleSprite _sprite = obj.GetComponentInChildren<SimpleSprite>();
			if( null!= _sprite )
				item.layers[2] = _sprite;
		}
	}
Example #29
0
	int ComparerBase(SkillView _left, SkillView _right)
	{
		if(_left.getSkillRecord == null || _right.getSkillRecord == null)
		{
			Debug.LogWarning("skill book record is null(left:" + _left.nSkillTableIdx + ", right:" + _right.nSkillTableIdx);
			return -1;
		}
		
		if(_left.getSkillRecord.ClassLevel > _right.getSkillRecord.ClassLevel)
			return 1;
		else if(_left.getSkillRecord.ClassLevel == _right.getSkillRecord.ClassLevel)
			return 0;
		else
			return -1;
	}
Example #30
0
    public override void Create(EffectBase effect, SkillView sv)
    {
        base.Create(effect, sv);

        m_effect_damage = effect as EffectDamage;
    }
Example #31
0
	void AddSkillByType(SkillView _skill, bool _isNew )
	{
		Tbl_Skill_Record record = AsTableManager.Instance.GetTbl_Skill_Record(_skill.nSkillTableIdx);
		
		switch(record.Skill_Type)
		{
		case eSKILL_TYPE.Active:
		case eSKILL_TYPE.Case:
		case eSKILL_TYPE.Charge:
		case eSKILL_TYPE.Target:
		case eSKILL_TYPE.SlotBase:
		case eSKILL_TYPE.Stance:
		case eSKILL_TYPE.TargetCharge:
			if(m_dicActive.ContainsKey(_skill.nSkillTableIdx) == true)
				m_dicActive.Remove(_skill.nSkillTableIdx);
			m_dicActive.Add(_skill.nSkillTableIdx, _skill);
			
			if( null!= AsHudDlgMgr.Instance && false == AsHudDlgMgr.Instance.IsOpenedSkillBook && true == _isNew )
			{
				if( false == m_newdicActive.ContainsKey( _skill.nSkillTableIdx ) )
				{	
					m_isNewSkillAdd = true;
					m_newdicActive.Add( _skill.nSkillTableIdx, true );
					AsHudDlgMgr.Instance.CheckNewMenuImg();
				}
			}
			SortActive();
			break;
		case eSKILL_TYPE.Command:
			if(m_dicFinger.ContainsKey(_skill.nSkillTableIdx) == true)
				m_dicFinger.Remove(_skill.nSkillTableIdx);
			m_dicFinger.Add(_skill.nSkillTableIdx, _skill);
			SortFinger();
			
			if( null!= AsHudDlgMgr.Instance && false == AsHudDlgMgr.Instance.IsOpenedSkillBook && true == _isNew )
			{
				if( false == m_newdicFinger.ContainsKey( _skill.nSkillTableIdx ) )
				{
					m_isNewSkillAdd = true;
					m_newdicFinger.Add( _skill.nSkillTableIdx, true );
					AsHudDlgMgr.Instance.CheckNewMenuImg();
				}
			}
			break;
		case eSKILL_TYPE.Passive:
			if(m_dicPassive.ContainsKey(_skill.nSkillTableIdx) == true)
				m_dicPassive.Remove(_skill.nSkillTableIdx);
			m_dicPassive.Add(_skill.nSkillTableIdx, _skill);
			SortPassive();
			
			if( null!= AsHudDlgMgr.Instance && false == AsHudDlgMgr.Instance.IsOpenedSkillBook && true == _isNew )
			{
				if( false == m_newdicPassive.ContainsKey( _skill.nSkillTableIdx ) )
				{
					m_isNewSkillAdd = true;
					m_newdicPassive.Add( _skill.nSkillTableIdx, true );
					AsHudDlgMgr.Instance.CheckNewMenuImg();
				}
			}
			break;
		case eSKILL_TYPE.Base:
		default:
			break;
		}
	}
Example #32
0
	public void ResetSkillBook()
	{
		#region - preserve current reset disable skills -
		Dictionary<int, SkillView> dicResetDisableSkills = new Dictionary<int, SkillView>();
		
		foreach(KeyValuePair<int, SkillView> pair in m_dicCurSkill)
		{
			Tbl_Skill_Record skill = AsTableManager.Instance.GetTbl_Skill_Record(pair.Value.nSkillTableIdx);
			if(skill.SkillReset == eSkillReset.Disable)
				dicResetDisableSkills.Add(skill.Index, pair.Value);
		}
		#endregion
		
		Release();
		
		AsUserEntity user = AsUserInfo.Instance.GetCurrentUserEntity();
		eRACE race = user.GetProperty<eRACE>(eComponentProperty.RACE);
		eCLASS __class = user.GetProperty<eCLASS>(eComponentProperty.CLASS);
		
		AsCharacterCreateClassData createData = AsTableManager.Instance.GetTbl_CreateCharacter_ClassData(race, __class);
		foreach(int idx in createData.commonProp.defaultSkills)
		{
			Tbl_Skill_Record record = AsTableManager.Instance.GetTbl_Skill_Record(idx);
			if(record.Skill_Type != eSKILL_TYPE.Base)// && record.SkillReset == eSkillReset.Enable)
			{
				SkillView view = new SkillView(idx, 1);
				
				m_dicCurSkill.Add(view.nSkillTableIdx, view);
				SortCurSkill();
				m_dicNotSetting.Add(view.nSkillTableIdx, view);
				SortNotSetting();
				
				AddSkillByType(view, false);
				
//				view.SetSkillBookRecordByClass(__class);
			}
		}
		
		#region - add preserved reset disable skills -
		foreach(KeyValuePair<int, SkillView> pair1 in dicResetDisableSkills)
		{
			bool processed = false;
			foreach(KeyValuePair<int, SkillView> pair2 in m_dicCurSkill)
			{
				if(pair1.Value.nSkillTableIdx == pair2.Value.nSkillTableIdx)
				{
					pair2.Value.nSkillLevel = pair1.Value.nSkillLevel;
					processed = true;
					break;
				}
			}
			
			if(processed == false)
			{
				SkillView view = pair1.Value;
					
				m_dicCurSkill.Add(view.nSkillTableIdx, view);
				SortCurSkill();
				m_dicNotSetting.Add(view.nSkillTableIdx, view);
				SortNotSetting();
				
				AddSkillByType(view, false);
			}
		}
		#endregion
		
		SetNewSkillInit();
	}
Example #33
0
 public override void InitView(BaseController controller)
 {
     base.InitView(controller);
     Instance = this;
     CreateItem();
 }
Example #34
0
 public void SubmitSkill(SkillView skill)
 {
     SelectedSkill  = skill;
     mSkillSubmited = true;
 }
Example #35
0
	public void SetCurrentSkill(body1_SC_SKILL_LIST _list)
	{
//		eCLASS __class = AsUserInfo.Instance.GetCurrentUserEntity().GetProperty<eCLASS>(eComponentProperty.CLASS);
		
		for(int i=0; i<_list.nSkillCnt; ++i)
		{
			SkillView curSlot = new SkillView(_list.body[i].nSkillTableIdx, _list.body[i].nSkillLevel);
//			curSlot.SetSkillBookRecordByClass(__class);
			
			Tbl_Skill_Record record = AsTableManager.Instance.GetTbl_Skill_Record(curSlot.nSkillTableIdx);
			if(record.Skill_Type == eSKILL_TYPE.Base)
				continue;
						
			m_dicCurSkill.Add(curSlot.nSkillTableIdx, curSlot);
			SortCurSkill();
			
			switch(record.Skill_Type)
			{
			case eSKILL_TYPE.Active:
			case eSKILL_TYPE.Case:
			case eSKILL_TYPE.Charge:
			case eSKILL_TYPE.Target:
			case eSKILL_TYPE.SlotBase:
			case eSKILL_TYPE.Stance:
			case eSKILL_TYPE.TargetCharge:
				m_dicNotSetting.Add(curSlot.nSkillTableIdx, curSlot);
				SortNotSetting();
			break;
			}
			
			AddSkillByType(curSlot, false);
		}
		
		SetNewSkillInit();
		
		// begin kij
		/*for(int i=m_RegisterBeginIdx; i<m_RegisterBeginIdx + m_RegisterSize; ++i)
		{			
			if(m_dicNotSetting.ContainsKey(m_QuickSlot[i].nValue) == true)
				m_dicNotSetting.Remove(m_QuickSlot[i].nValue);	
		}*/
		
		//ResetDicNotSettingData();
		// end kij
		
		InitStance(_list);
	}