示例#1
0
        public int GetDestroyed(SkillRunner caster, float durDec, float radius)
        {
            if (!GameConfig.IsMultiMode)
            {
                NaturalRes res = NaturalResAsset.NaturalRes.GetTerrainResData(mGroundItem._treeInfo.m_protoTypeIdx + 1000);
                if (m_Hp > 0)
                {
                    m_Hp -= durDec * res.m_duration;
                    UITreeCut.Instance.SetSliderValue(mGroundItem._treeInfo, m_Hp / mMaxHp);
                    //PlayerFactory.mMainPlayer.UpdateTreeHp(mGroundItem._treeInfo, m_Hp);
                    //if (m_Hp <= 0)
                    //{
                    //    if (null != LSubTerrainMgr.Instance)
                    //    {
                    //        LSubTerrainMgr.DeleteTree(mGroundItem);
                    //        LSubTerrainMgr.RefreshAllLayerTerrains();
                    //    }
                    //    else if (null != RSubTerrainMgr.Instance)
                    //    {
                    //        RSubTerrainMgr.DeleteTree(mGroundItem._treeInfo);
                    //        RSubTerrainMgr.RefreshAllLayerTerrains();
                    //    }
                    //    TreeCutGui_N.Instance.HideWindow();
                    //    return 101;
                    //}
                }
            }
            else
            {
                //NaturalRes res = NaturalResAsset.NaturalRes.GetTerrainResData(mGroundItem._treeInfo.m_protoTypeIdx + 1000);
                //m_Hp -= durDec * res.m_duration;
                //TreeCutGui_N.Instance.SetSliderValue(m_Hp / mMaxHp);
                //PlayerFactory.mMainPlayer.UpdateTreeHp(mGroundItem._treeInfo, m_Hp);
                //if (m_Hp <= 0)
                //{
                //	if (null != RSubTerrainMgr.Instance)
                //	{
                //		TreeInfo treeInfo = mGroundItem._treeInfo;
                //		//RSubTerrainMgr.DeleteTreesAtPos(mGroundItem._treeInfo.m_pos);
                //		LogManager.Debug("RPC_C2S_GroundItemTarget: " + weaponBonus + ", " + treeInfo.m_protoTypeIdx + "," + treeInfo.m_widthScale + "," + treeInfo.m_heightScale);
                //		caster.RPC("RPC_C2S_GroundItemTarget", weaponBonus, treeInfo.m_protoTypeIdx, treeInfo.m_widthScale, treeInfo.m_heightScale,treeInfo.m_pos);
                //	}
                //	TreeCutGui_N.Instance.HideWnd();
                //	return 100;
                //}

//				NaturalRes res = NaturalResAsset.NaturalRes.GetTerrainResData(mGroundItem._treeInfo.m_protoTypeIdx + 1000);
//				if (null != res)
//				{
//					TreeInfo treeInfo = mGroundItem._treeInfo;
//					caster.RPCServer(EPacketType.PT_InGame_SkillGroundItem, res.mCastSkill, treeInfo.m_pos,
//						treeInfo.m_protoTypeIdx, treeInfo.m_heightScale, treeInfo.m_widthScale);
//				}

                return(0);
            }
            return(0);
        }
示例#2
0
 public override void InitEquipment(SkillAsset.SkillRunner runner, ItemAsset.ItemObject item)
 {
     base.InitEquipment(runner, item);
     if (null != mGlideObj)
     {
         mAnimator = mGlideObj.GetComponent <Animator>();
     }
     mPCM = runner.GetComponent <PhysicsCharacterMotor>();
 }
示例#3
0
        public int GetDestroyed(SkillRunner caster, float durDec, float radius)
        {
            return(0);
//			if (!GameConfig.IsMultiMode)
//			{
////				int count = DigTerrainManager.Instance.DigTerrain(m_intPos, durDec, radius, ref mRemoveList);
////				m_bDestroyed = count > 0;
////				return count;
//				return 0;
//			}
//			else
//			{
//				int count = DigTerrainManager.DigTerrainNetwork(caster, m_intPos, durDec, radius, ref m_voxel);
//                return count;
//			}
        }
示例#4
0
 internal virtual void ApplyBuffContinuous(SkillRunner caster, short buffSp)
 {
 }
示例#5
0
 internal virtual void ApplyDurChange(SkillRunner caster, float durChange, int type)
 {
 }
示例#6
0
 internal abstract void ApplyHpChange(SkillRunner caster, float hpChange, float damagePercent, int type);
示例#7
0
 //internal abstract Get
 // Apply changed of properties directly to
 internal abstract void ApplyDistRepel(SkillRunner caster, float distRepel);