示例#1
0
    public void Create(AsBaseEntity _baseEntity, float _namePanelPosY)
    {
        m_bShowCommand = true;

        m_baseEntity = _baseEntity;

        gameObject.SetActive(true);

//        string strNameRes = string.Empty;
//        string strNameBuf = string.Empty;

        m_vUIPosRevision.x = 0.0f;
        m_vUIPosRevision.y = _namePanelPosY  + questSprites[0].height * 0.5f;
        m_vUIPosRevision.z = m_fNamePanelLayer;


        dummyLeadTop = m_baseEntity.GetDummyTransform("DummyLeadTop");
        if (null == dummyLeadTop)
		{
			if( true == m_baseEntity.isKeepDummyObj)
			{
				Vector3 vPos = m_baseEntity.transform.position;
				vPos.y += m_baseEntity.characterController.height;
				transform.position = _WorldToUIPoint( vPos, m_vUIPosRevision);
			}
			else
				Debug.LogWarning("DummyLeadTop is not found");
		}
        else
            transform.position = _WorldToUIPoint(dummyLeadTop.position, m_vUIPosRevision);//////////

        _baseEntity.questPanel = this;
    }
    public void Init(int _npcID, AsPanel_Name _namePanel, AsBaseEntity _entity)
    {
        npcID     = _npcID;
        panelName = _namePanel;

        Transform tmDummyTop = ResourceLoad.SearchHierarchyTransform(transform, "DummyLeadTop");

        markObj = ResourceLoad.CreateGameObject("UseScript/Object/Exclamation_Blue");

        if (markObj != null)
        {
            if (tmDummyTop != null)
            {
                markObj.transform.position = tmDummyTop.transform.position;
                markObj.transform.parent = transform;
            }
            else
			{
				if( true == _entity.isKeepDummyObj)
				{
					Vector3 vPos = _entity.transform.position;
					vPos.y += _entity.characterController.height;
					markObj.transform.position = vPos;
					markObj.transform.parent = _entity.transform;
				}
				else
					Debug.Log("dummy is null");
			}

            markObj.SetActiveRecursively(false);
        }
    }
示例#3
0
    public void Init(AsBaseEntity _target)
    {
        targetObject = _target.gameObject;

        //Transform tmDummyTop = _target.GetDummyTransform("DummyLeadTop");

        //if (tmDummyTop == null)
       // {
            transform.parent        = _target.transform;
            transform.localPosition = Vector3.zero;
            transform.localRotation = Quaternion.identity;

            CharacterController controller = targetObject.GetComponentInChildren<CharacterController>();

            if (controller != null)
                transform.localPosition = new Vector3(0.0f, controller.height + 1.1f * 1.0f / _target.transform.lossyScale.y, 0.0f);

            //Debug.LogWarning("Can't find dummyleadTop = " + _target.GetComponent<AsNpcEntity>().GetProperty<string>(eComponentProperty.NAME));
       // }
       // else
       // {
         //   transform.parent        = tmDummyTop;
        //    transform.localRotation = Quaternion.identity;
        //    transform.localPosition = Vector3.zero;
       // }

        objClearMark.SetActiveRecursively(false);
        objNothingMark.SetActiveRecursively(false);
        objUpperLvMark.SetActiveRecursively(false);

        parentTransform = transform.parent;

        bInit = true;
    }
示例#4
0
	public override void LateInit(AsBaseEntity _entity)
	{
		if( null == m_NpcEntity )
		{
			SetNpcFsmState(eNpcFsmStateType.IDLE);
			Debug.LogError("AsNpcFsm::LateInit()[ null == m_NpcEntity ] : " );
			return;
		}
		
		Tbl_Npc_Record npcRec = AsTableManager.Instance.GetTbl_Npc_Record(m_NpcEntity.TableIdx);
		if(npcRec == null)
		{
			SetNpcFsmState(eNpcFsmStateType.IDLE);
			Debug.LogError("AsNpcFsm::LateInit()[ null == npcRec ] : " + m_NpcEntity.TableIdx );
			return;
		}
		
		m_NpcEntity.npcWarpIndex = npcRec.warpIndex;		
		if( m_NpcEntity.isNoWarpIndex )			
		{				
			SetNpcFsmState(eNpcFsmStateType.IDLE);
		}
		else
		{			
			SetNpcFsmState(eNpcFsmStateType.PORTAL);
		}
	}
示例#5
0
	public override void Init( AsBaseEntity _entity)
	{
		base.Init( _entity);

		_entity.SetNavPathDistance( GetNavPathDistance);

		if( m_kController == null)
		{
			CharacterController attached = gameObject.AddComponent<CharacterController>();
			if( attached == null)
				Debug.LogError( "AsMover::InterInit: attaching controller failed");
			else
			{
				m_kController = attached;

				// default setting, ilmeda
//				if( eEntityType.USER == m_Entity.EntityType)
//				{
					m_kController.center = new Vector3( 0.0f, 1.0f, 0.0f);
					m_kController.height = 2.0f;
//				}
			}
		}

		m_Entity.SetCharacterController( m_kController);
		m_kController.slopeLimit = 70f;
	}
示例#6
0
	public BuffElement(Msg_CharBuff_Body _body, BuffProcessor _owner, bool _effect)
	{
		m_CurId = s_Index++;
		
		m_Owner = _owner.Owner;
		m_Processor = _owner;
		
		m_Body = _body;
		
		m_BuffType = _body.type_;
		m_Activated = _effect;
		
		int effectIdx = int.MaxValue;	
		if(BuffBaseMgr.s_MonsterSkillIndexRange_Min <= _body.skillTableIdx_ && _body.skillTableIdx_ <= BuffBaseMgr.s_MonsterSkillIndexRange_Max)
		{
			#region - set skill name -
			Tbl_MonsterSkill_Record skillRecord = AsTableManager.Instance.GetTbl_MonsterSkill_Record(_body.skillTableIdx_);
			SetSkillData(skillRecord);
			#endregion
			
//			Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_);
			Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevelTableIdx_);
			
			try{
				effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex;
				m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_];
			}
			catch(System.Exception e)
			{
				Debug.LogError(e);
			}
		}
		else
		{
			#region - set skill name -
			Tbl_Skill_Record skillRecord = AsTableManager.Instance.GetTbl_Skill_Record(_body.skillTableIdx_);
			SetSkillData(skillRecord);
			#endregion
			
			Tbl_SkillLevel_Record skill = null;
			
			if(_body.chargeStep_ == int.MaxValue)
			{
				skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_);
			}
			else
			{
				skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_, _body.chargeStep_);
			}
						
			effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex;
			m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_];
		}
		
		m_SkillIdx = _body.skillTableIdx_;
		m_PotencyIdx = _body.potencyIdx_;
		m_Record = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(effectIdx);
	}
示例#7
0
	public override void InterInit(AsBaseEntity _entity)
	{
		m_dicFsmState[eNpcFsmStateType.IDLE].Init();
		m_dicFsmState[eNpcFsmStateType.ACCOST].Init();
		m_dicFsmState[eNpcFsmStateType.POPUP].Init();
		m_dicFsmState[eNpcFsmStateType.WALK].Init();
		
		gameObject.layer = LayerMask.NameToLayer("Npc");
	}
示例#8
0
	public ElementProcessor(AsBaseEntity _entity)
	{
		m_Owner = _entity;
		
		m_Effect = new EffectProcessor(_entity);
		m_Sound = new SoundProcessor(_entity);		
		m_Potency = new PotencyProcessor(_entity);		
		m_Buff = new BuffProcessor(_entity);
	}
示例#9
0
	public override void InterInit( AsBaseEntity _entity)
	{
		if( _entity.FsmType == eFsmType.PLAYER)
			Debug.Log( "AsModel:: InterInit: shop opening = " + _entity.GetProperty<bool>( eComponentProperty.SHOP_OPENING));
		
#if _USE_DUMMY_OBJECT
		CreateDummyObj( _entity.FsmType);
#endif

		AsEntityManager.Instance.RequestModelLoading( this);
	}
示例#10
0
	public override void Init( AsBaseEntity _entity)
	{
		base.Init( _entity);
		
		_entity.SetModelTypeDelegate( CheckModelTypeDelegate);
		_entity.SetModelLoadingStateDelegate( CheckModelLoadingStateDelegate);
		_entity.SetPartsLoadedDelegate( CheckPartsLoadedDelegate);
		
//#if _USE_DUMMY_OBJECT
//		CreateDummyObj( _entity.FsmType);
//#endif
	}
	public override void Init(AsBaseEntity _entity)
	{
		base.Init(_entity);
		
//		m_Entity = GetComponent<AsBaseEntity>();
//		if(m_Entity == null)
//		{
//			Debug.LogError("AsPropertyDelayer_Combat::Init: no entity attached");
//			return;
//		}
		
		m_CombatState = m_dicCombatState[eCombatStateType.IDLE];
	}
示例#12
0
	public void Display( AsBaseEntity entity)
	{
		gameObject.SetActive(true);
		
		foreach( GameObject obj in gradeFrame)
			obj.SetActiveRecursively( false);
		
		eMonster_Grade eGrade = entity.GetProperty<eMonster_Grade>( eComponentProperty.GRADE);
		switch( eGrade)
		{
		case eMonster_Grade.Normal:
			gradeFrame[0].SetActiveRecursively( true);
			break;
		case eMonster_Grade.Elite:
			gradeFrame[1].SetActiveRecursively( true);
			break;
		case eMonster_Grade.Champion:
			gradeFrame[2].SetActiveRecursively( true);
			break;
		case eMonster_Grade.Boss:
			gradeFrame[3].SetActiveRecursively( true);
			break;
		case eMonster_Grade.DObject:
		case eMonster_Grade.QObject:
			Debug.LogWarning( "Target grade icon is not added: " + eGrade);
			break;
		case eMonster_Grade.Named:
			gradeFrame[4].SetActiveRecursively( true);
			break;
		case eMonster_Grade.Trap:
			break;
		default:
			Debug.LogError( "Invalid target grade : " + eGrade);
			break;
		}
		
//		eMonster_AttackType eAttackType = entity.GetProperty<eMonster_AttackType>( eComponentProperty.MONSTER_ATTACK_TYPE);
//		switch( eAttackType)
//		{
//		case eMonster_AttackType.Fool:
//			break;
//		case eMonster_AttackType.Peaceful:
//			break;
//		case eMonster_AttackType.Offensive:
//			break;
//		default:
//			Debug.LogError( "Invalid target attack type : " + eAttackType);
//		}
	}
	public void Display( AsBaseEntity target)
	{
		gameObject.SetActive(true);
		
		styles[0].gameObject.SetActive( false);
		styles[1].gameObject.SetActive( false);
		
		if( null == target)
			return;
		
		eMonster_AttackStyle attackStyle = target.GetProperty<eMonster_AttackStyle>( eComponentProperty.MONSTER_ATTACK_STYLE);
		if( eMonster_AttackStyle.NONE == attackStyle)
			return;
		
		styles[ (int)attackStyle - 1].gameObject.SetActive( true);
	}
    //public void SetMarkType(QuestMarkType _type)
    //{
    //    try
    //    {
    //        nowType = _type;

    //        foreach (SimpleSprite sprite in questSprites)
    //            sprite.Hide(true);

    //        if (nowType == QuestMarkType.CLEAR_REMAINTALK || nowType == QuestMarkType.TALK_CLEAR || nowType == QuestMarkType.TALK_HAVE)
    //            questSprites[(int)QuestPanelType.QUEST_NEW_TALK].Hide(false);
    //        else if (nowType == QuestMarkType.CLEAR || nowType == QuestMarkType.CLEAR_AND_HAVE)
    //            questSprites[(int)QuestPanelType.QUEST_CLAR].Hide(false);
    //        else if (nowType == QuestMarkType.HAVE)
    //            questSprites[(int)QuestPanelType.QUEST_NEW].Hide(false);
    //        else if (nowType == QuestMarkType.UPPERLEVEL)
    //            questSprites[(int)QuestPanelType.QUEST_NEW_UPPERLEVEL].Hide(false);
    //    }
    //    catch (System.Exception e)
    //    {
    //        Debug.LogError(e.Message);
    //    }

    //}

    public void Initilize(AsBaseEntity _baseEntity, BoxCollider _collider,  float _namePanelPosY, AchUseItemToTarget _achUseItemToTarget, UISlotItem _slotItem, CoolTimeGroup _coolTimeGroup)
    {
        m_bShowCommand = true;

        m_baseEntity = _baseEntity;

        achUseItemToTarget = _achUseItemToTarget;

		slotItem = _slotItem;

		coolTimeGroup = _coolTimeGroup;

        gameObject.SetActiveRecursively(true);

        if (_baseEntity.questPanel != null)
            _baseEntity.questPanel.gameObject.SetActiveRecursively(false);

		if (_baseEntity.collectionMark != null)
			_baseEntity.collectionMark.Visible = false;

        itemCollider = _collider;
        
        // Calculate U.I Position
        m_vUIPosRevision.x = 0.0f;
        m_vUIPosRevision.y = _namePanelPosY;// +questSprites[0].height * 0.5f;
        m_vUIPosRevision.z = m_fNamePanelLayer;

        dummyLeadTop = m_baseEntity.GetDummyTransform("DummyLeadTop");
        if (null == dummyLeadTop)
		{
			if( true == m_baseEntity.isKeepDummyObj)
			{
				Vector3 vPos = m_baseEntity.transform.position;
				vPos.y += m_baseEntity.characterController.height;
				transform.position = _WorldToUIPoint( vPos, m_vUIPosRevision);
			}
			else
				Debug.LogWarning("DummyLeadTop is not found");
		}
        else
            transform.position = _WorldToUIPoint(dummyLeadTop.position, m_vUIPosRevision);//////////
    }
示例#15
0
	public override void InterInit(AsBaseEntity _entity)
	{
		m_dicFsmState.Add(eObjectFsmStateType.IDLE, new AsObjState_Idle(this));
        m_dicFsmState.Add(eObjectFsmStateType.BREAK, new AsObjState_Break(this));       
		m_dicFsmState.Add(eObjectFsmStateType.STEPPING_LEAF, new AsObjState_Stepping(this));
		m_dicFsmState.Add(eObjectFsmStateType.POST_BOX, new AsObjState_PostBox(this));
		m_dicFsmState.Add(eObjectFsmStateType.STORAGE, new AsObjState_Storage(this));
		m_dicFsmState.Add(eObjectFsmStateType.WAYPOINT, new AsObjState_Waypoint(this));
		
		
		switch( m_ObjectEntity.GetProperty<eOBJECT_PROP>(eComponentProperty.OBJ_TYPE) )
		{			
		case eOBJECT_PROP.STEPPING_LEAF:
            SetObjectFsmState(eObjectFsmStateType.STEPPING_LEAF);
			break;
			
		case eOBJECT_PROP.BROKEN_PROP:
			SetObjectFsmState(eObjectFsmStateType.BREAK);
			break;	
		case eOBJECT_PROP.POST_BOX:
			SetObjectFsmState(eObjectFsmStateType.POST_BOX);
			break;
		case eOBJECT_PROP.STORAGE:
			SetObjectFsmState(eObjectFsmStateType.STORAGE);
			break;
			
		case eOBJECT_PROP.WAYPOINT:
			SetObjectFsmState(eObjectFsmStateType.WAYPOINT);
			break;
			
		}
        
        gameObject.layer = LayerMask.NameToLayer("Object");
		Transform trs = gameObject.transform.FindChild( "Model" );
		if( null != trs )
		{
			trs.gameObject.layer = LayerMask.NameToLayer("Object");
		}
	}
示例#16
0
	public override void InterInit( AsBaseEntity _entity)
	{
//		if( m_kController == null)
//		{
//			CharacterController attached = gameObject.AddComponent<CharacterController>();
//			if( attached == null)
//				Debug.LogError( "AsMover::InterInit: attaching controller failed");
//			else
//			{
//				m_kController = attached;
//
//				// default setting, ilmeda
//				if( eEntityType.USER == m_Entity.EntityType)
//				{
//					m_kController.center = new Vector3( 0.0f, 1.0f, 0.0f);
//					m_kController.height = 2.0f;
//				}
//			}
//		}
//
//		m_Entity.SetCharacterController( m_kController);
	}
示例#17
0
	public void Display( AsBaseEntity entity)
	{
		gameObject.SetActive(true);
		
		foreach( SimpleSprite attr in attrs)
			attr.gameObject.SetActiveRecursively( false);
		
		int elementalIndex = entity.GetProperty<int>( eComponentProperty.ATTRIBUTE);
		switch( elementalIndex)
		{
		case 0:
			attrs[ (int)ePotency_Element.NONE].gameObject.SetActiveRecursively( true);
			break;
		case 1:
		case 6:
		case 10:
			attrs[ (int)ePotency_Element.Fire].gameObject.SetActiveRecursively( true);
			break;
		case 2:
		case 7:
		case 11:
			attrs[ (int)ePotency_Element.Ice].gameObject.SetActiveRecursively( true);
			break;
		case 3:
		case 8:
		case 12:
			attrs[ (int)ePotency_Element.Light].gameObject.SetActiveRecursively( true);
			break;
		case 4:
		case 9:
		case 13:
			attrs[ (int)ePotency_Element.Dark].gameObject.SetActiveRecursively( true);
			break;
		case 5:
			attrs[ (int)ePotency_Element.Nature].gameObject.SetActiveRecursively( true);
			break;
		}
	}
示例#18
0
	public EffectElement(Tbl_Action_Effect _effect, AsBaseEntity _owner, Vector3 _pos, Transform _targetTrn, float _animSpeed)
	{
		if(_animSpeed == 0f) Debug.LogError("BuffProcessor::EffectElement: _animSpeed = 0");
		
		m_Effect = _effect;
		
		m_Owner = _owner;
		
		m_EffectName = _effect.FileName;
		m_Timing = _effect.Timing;// / _animSpeed;
		m_LoopType = _effect.LoopType;
		m_LinkType = _effect.LinkType;
		m_LoopDuration = _effect.LoopDuration;
		m_PositionFix = _effect.PositionFix;
		
		m_SetTime = Time.time;
		m_Pos = _pos;
		m_TargetTrn = _targetTrn;
		if( m_TargetTrn != null)
			m_PositionCached = m_TargetTrn.position;
		
		m_AnimSpeed = _animSpeed;
	}
	public void Display( AsBaseEntity entity)
	{
		gameObject.SetActive(true);
		
		foreach( SimpleSprite icon in typeIcons)
			icon.gameObject.SetActiveRecursively( false);
		
		eITEM_PRODUCT_TECHNIQUE_TYPE _type = (eITEM_PRODUCT_TECHNIQUE_TYPE)entity.GetProperty<int>( eComponentProperty.COLLECTOR_TECHNIC_TYPE);
		switch( _type)
		{
		case eITEM_PRODUCT_TECHNIQUE_TYPE.QUEST:
			typeIcons[3].gameObject.SetActiveRecursively( true);
			break;
		case eITEM_PRODUCT_TECHNIQUE_TYPE.MINERAL:
			typeIcons[2].gameObject.SetActiveRecursively( true);
			break;
		case eITEM_PRODUCT_TECHNIQUE_TYPE.SPIRIT:
			typeIcons[1].gameObject.SetActiveRecursively( true);
			break;
		case eITEM_PRODUCT_TECHNIQUE_TYPE.PLANTS:
			typeIcons[0].gameObject.SetActiveRecursively( true);
			break;
		}
	}
示例#20
0
	public override void InterInit( AsBaseEntity _entity)
	{
		SetCollectionFsmState( eCollectionFsmStateType.IDLE);
	}
示例#21
0
	public override void LateInit( AsBaseEntity _entity)
	{
	}
示例#22
0
	public override void LateInit( AsBaseEntity _entity)
	{
		SetPlayerFsmState( ePlayerFsmStateType.IDLE);

//		if( m_Entity.AnimEnableViaShop == true)
//		{
//			SetPlayerFsmState( ePlayerFsmStateType.IDLE);
//		}
//		else
//		{
//			SetPlayerFsmState( ePlayerFsmStateType.PRIVATESHOP);
//		}
	}
示例#23
0
	public override void Init( AsBaseEntity _entity)
	{
		base.Init( _entity);

		gameObject.layer = LayerMask.NameToLayer( "Collection");
	}
示例#24
0
	public override void Init( AsBaseEntity _entity)
	{
		base.Init( _entity);
		
		m_InitSize = m_Entity.transform.localScale;

		m_ElementProcessor = new ElementProcessor( m_Entity);
		m_Entity.SetConditionCheckDelegate( m_ElementProcessor.GetEnableCondition);
		m_Entity.SetBuffCheckDelegate( m_ElementProcessor.CheckBuffInclusion);
		m_Entity.SetTargetShopOpening( TargetShopOpening);

		gameObject.layer = LayerMask.NameToLayer( "Player");
	}
示例#25
0
	public override void InterInit( AsBaseEntity _entity)
	{
//		if( m_Entity.GetProperty<bool>( eComponentProperty.SHOP_OPENING) == false)
//		{
			m_dicFsmState[ePlayerFsmStateType.CHOICE].Init();

			m_dicFsmState[ePlayerFsmStateType.IDLE].Init();
			m_dicFsmState[ePlayerFsmStateType.RUN].Init();
			m_dicFsmState[ePlayerFsmStateType.RUN_OTHERUSER].Init();
			m_dicFsmState[ePlayerFsmStateType.RUN_NPC].Init();
			m_dicFsmState[ePlayerFsmStateType.RUN_OBJECT].Init();

			m_dicFsmState[ePlayerFsmStateType.BATTLE_IDLE].Init();
			m_dicFsmState[ePlayerFsmStateType.BATTLE_RUN].Init();
			m_dicFsmState[ePlayerFsmStateType.WAKE].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_STUN].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_FREEZE].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_SLEEP].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_FORCEDMOVE].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_AIRBONE].Init();
			m_dicFsmState[ePlayerFsmStateType.CONDITION_TRANSFORM].Init();
			m_dicFsmState[ePlayerFsmStateType.DEATH].Init();

			m_dicFsmState[ePlayerFsmStateType.SKILL_READY].Init();
			m_dicFsmState[ePlayerFsmStateType.SKILL_HIT].Init();
			m_dicFsmState[ePlayerFsmStateType.SKILL_FINISH].Init();
			m_dicFsmState[ePlayerFsmStateType.OBJ_STEPPING].Init();

			m_dicFsmState[ePlayerFsmStateType.PRIVATESHOP].Init();

			m_dicFsmState[ePlayerFsmStateType.RUN_COLLECT].Init();
			m_dicFsmState[ePlayerFsmStateType.WORK_COLLECT].Init();
			m_dicFsmState[ePlayerFsmStateType.READY_COLLECT].Init();
			m_dicFsmState[ePlayerFsmStateType.PRODUCT].Init();
//		}
	}
示例#26
0
	public void SetTargetForQuestItem( AsBaseEntity _target)
	{
		Target = _target;
		m_TargetForQuestItem = true;
	}
示例#27
0
	void OnHitExecution( AsIMessage _msg)
	{
		if( m_AttackSC == null)
			return;

//		if( m_AttackSC.action_.HitAnimation != null &&
//				m_AttackSC.action_.HitAnimation.hitInfo != null &&
//				m_AttackSC.action_.HitAnimation.hitInfo.HitType == eHitType.ProjectileTarget)
//		{
//			Tbl_Action_HitInfo hitInfo = m_AttackSC.action_.HitAnimation.hitInfo;
//
//			Debug.Log( "AsPlayerFsm::OnAttackSC: ( time:" + System.DateTime.Now + ") projectile target =  " + hitInfo.HitProjectileHitFileName);
//		}

		Int32 mainTargetId = m_AttackSC.npcIdx_[0];

		ProjectileHit();

		if( m_AttackSC.hpHeal_ > 0)
		{
			AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity();
			AsHUDController.Instance.panelManager.ShowNumberPanel( userEntity, (int)( m_AttackSC.hpHeal_), eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_USING_SKILL, AsPanelManager.eCustomFontType.eCustomFontType_HP);
//			userEntity.SetProperty( eComponentProperty.HP_CUR, m_AttackSC.hpCur_);
		}

		//npc
		foreach( Msg_OtherCharAttackNpc2 attack2 in m_AttackSC.npcBody_)
		{
			AsEntityManager.Instance.DispatchMessageByNpcSessionId( attack2.npcIdx_, attack2);

			#region - hud -
			// < ilmeda 20120425
			if( null != AsHUDController.Instance)
			{
				AsNpcEntity npcEntity = AsEntityManager.Instance.GetNpcEntityBySessionId( attack2.npcIdx_);
				if( null != npcEntity)
				{
					AsHUDController.Instance.panelManager.ShowNumberPanel( npcEntity.gameObject, (int)attack2.damage_, attack2.eDamageType_, attack2.parent_.action_, true);//, m_AttackSC.actionTableIdx_);
					
					if(attack2.heal_ < 0f)
						AsHUDController.Instance.panelManager.ShowNumberPanel( npcEntity.gameObject, (int)-attack2.heal_, attack2.eDamageType_, attack2.parent_.action_, true);//, m_AttackSC.actionTableIdx_);
					
					if( (int)attack2.reflection_ > 0)
					{
						AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity();
						AsHUDController.Instance.panelManager.ShowNumberPanel( userEntity.transform.gameObject, (int)( attack2.reflection_), attack2.eDamageType_, false);
					}

					if( null != AsHUDController.Instance.targetInfo.getCurTargetEntity)
					{
						if( AsHUDController.Instance.targetInfo.getCurTargetEntity.GetInstanceID() == ( ( AsBaseEntity)npcEntity).GetInstanceID())
							AsHUDController.Instance.targetInfo.UpdateTargetSimpleInfo( ( AsBaseEntity)npcEntity);
					}
				}
			}
			// ilmeda 20120425 >
			if( attack2.npcIdx_ == mainTargetId)
			{
				if( null != AsHUDController.Instance)
				{
					AsHUDController.Instance.targetInfo.HpCur = (int)attack2.hpCur_;

					if( 0 >= attack2.hpCur_)
					{
						m_Target = null;
						AsHUDController.Instance.targetInfo.Enable = false;
					}
					else
					{
						if( false == AsHUDController.Instance.targetInfo.Enable)
							AsHUDController.Instance.targetInfo.Enable = true;
					}
				}
			}
			#endregion
		}

		//pc
		foreach( Msg_OtherCharAttackNpc3 attack3 in m_AttackSC.charBody_)
		{
			AsEntityManager.Instance.DispatchMessageByUniqueKey( attack3.charUniqKey_, attack3);
			
			#region - hud -
			if( attack3.reflection_ > 0 && Entity != null)
			{
				if( null != AsHUDController.Instance)
				{
					AsHUDController.Instance.panelManager.ShowNumberPanel( Entity.gameObject, (int)attack3.reflection_, attack3.eDamageType, true);	// need reflection font
					m_Entity.SetProperty( eComponentProperty.HP_CUR, m_AttackSC.hpCur_);
					AsEntityManager.Instance.MessageToPlayer( new Msg_ReflectionRefresh( Entity));
				}
			}
			#endregion
		}

		m_Entity.SetProperty( eComponentProperty.HP_CUR, m_AttackSC.hpCur_);// life steal
		AsUserInfo.Instance.SavedCharStat.hpCur_ = m_AttackSC.hpCur_;

		if( m_AttackSC.hpCur_ < 1)
		{
			UserEntity.SetProperty( eComponentProperty.LIVING, false);
			#region - quest -
			ArkQuestmanager.instance.QuestFailByDeath();
			#endregion
			StartCoroutine( DeathProcess( _msg));
		}

		m_AttackSC = null;//release
	}
示例#28
0
	public override void LastInit( AsBaseEntity _entity)
	{
		m_InitSize = m_Entity.transform.localScale;
	}
示例#29
0
	public override void LateInit( AsBaseEntity _entity)
	{
		SetMonsterFsmState( eMonsterFsmStateType.IDLE);
	}
示例#30
0
	public override void InterInit( AsBaseEntity _entity)
	{
		m_dicFsmState[eMonsterFsmStateType.APPEAR].Init();
		m_dicFsmState[eMonsterFsmStateType.IDLE].Init();
		m_dicFsmState[eMonsterFsmStateType.RUN].Init();
		m_dicFsmState[eMonsterFsmStateType.DEATH].Init();

		m_dicFsmState[eMonsterFsmStateType.SKILL_READY].Init();
		m_dicFsmState[eMonsterFsmStateType.SKILL_HIT].Init();
		m_dicFsmState[eMonsterFsmStateType.SKILL_FINISH].Init();

		m_dicFsmState[eMonsterFsmStateType.CONDITION_STUN].Init();
		m_dicFsmState[eMonsterFsmStateType.CONDITION_FREEZE].Init();
		m_dicFsmState[eMonsterFsmStateType.CONDITION_SLEEP].Init();
		m_dicFsmState[eMonsterFsmStateType.CONDITION_AIRBONE].Init();
		m_dicFsmState[eMonsterFsmStateType.CONDITION_TRANSFORM].Init();

		m_dicFsmState[eMonsterFsmStateType.CONDITION_FORCEDMOVE].Init();
	}