public void Create(Vector3 pos, int damage, UIDamageNum.DAMAGE_COLOR color, int groupOffset = 0, int effective = 0)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Expected O, but got Unknown
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Expected O, but got Unknown
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Expected O, but got Unknown
		//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_0207: Unknown result type (might be due to invalid IL or missing references)
		//IL_020c: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0220: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
		if (this.get_gameObject().get_activeInHierarchy())
		{
			float pixelHeight = MonoBehaviourSingleton<InGameCameraManager>.I.GetPixelHeight();
			Vector3 pos2 = default(Vector3);
			pos2._002Ector(pos.x, pos.y + MonoBehaviourSingleton<InGameSettingsManager>.I.selfController.screenSaftyOffset, pos.z);
			Vector3 pos3 = MonoBehaviourSingleton<InGameCameraManager>.I.WorldToScreenPoint(pos2);
			if (pos3.y > pixelHeight)
			{
				pos3.y = pixelHeight;
				pos = MonoBehaviourSingleton<InGameCameraManager>.I.ScreenToWorldPoint(pos3);
				pos.y -= MonoBehaviourSingleton<InGameSettingsManager>.I.selfController.screenSaftyOffset;
			}
			bool flag = color != UIDamageNum.DAMAGE_COLOR.BUFF && UIDamageNum.DAMAGE_COLOR.NONE != color;
			if (groupOffset > 0 || flag)
			{
				CreateAdditionalDamage(pos, damage, color, groupOffset, originalDamage, effective);
			}
			else
			{
				UIDamageNum uIDamageNum = null;
				int num = 0;
				int i = 0;
				for (int count = damageNumList.Count; i < count; i++)
				{
					if (!damageNumList[i].enable)
					{
						uIDamageNum = damageNumList[i];
						num = i;
						break;
					}
				}
				if (uIDamageNum == null)
				{
					GameObject val = Object.Instantiate(m_damageNumObj);
					if (val == null)
					{
						return;
					}
					Utility.Attach(base._transform, val.get_transform());
					uIDamageNum = val.GetComponent<UIDamageNum>();
					if (uIDamageNum == null)
					{
						Object.Destroy(val);
						return;
					}
					damageNumList.Add(uIDamageNum);
					num = damageNumList.Count - 1;
				}
				additionalGroupOffset = 0;
				originalDamage = null;
				int num2 = 0;
				int num3 = 0;
				while (num2 < damageNumList.Count)
				{
					if (num2 != num && damageNumList[num2].enable)
					{
						if (num3 > 10)
						{
							groupOffset = 0;
							additionalGroupOffset = 0;
							break;
						}
						uIDamageNum.get_transform().set_position(uIDamageNum.GetUIPosFromWorld(pos, groupOffset));
						Vector3 localPosition = uIDamageNum.get_transform().get_localPosition();
						Vector3 localPosition2 = damageNumList[num2].get_transform().get_localPosition();
						if (Mathf.Abs(localPosition2.x - localPosition.x) < uIDamageNum.grid.cellWidth * (float)damageNumList[num2].DamageLength && Mathf.Abs(localPosition2.y - localPosition.y) < uIDamageNum.grid.cellHeight - uIDamageNum.grid.cellHeight / 4f)
						{
							groupOffset++;
							additionalGroupOffset++;
							num2 = 0;
							num3++;
							continue;
						}
					}
					num2++;
				}
				originalDamage = uIDamageNum;
				if (!uIDamageNum.Initialize(pos, damage, color, groupOffset))
				{
					return;
				}
			}
		}
	}
	private void CreateAdditionalDamage(Vector3 pos, int damage, UIDamageNum.DAMAGE_COLOR color, int groupOffet, UIDamageNum originalDamage, int effective)
	{
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Expected O, but got Unknown
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Expected O, but got Unknown
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		UIAdditionalDamageNum uIAdditionalDamageNum = null;
		int i = 0;
		for (int count = additionalDamageNumList.Count; i < count; i++)
		{
			if (!additionalDamageNumList[i].enable)
			{
				uIAdditionalDamageNum = additionalDamageNumList[i];
				break;
			}
		}
		if (uIAdditionalDamageNum == null)
		{
			GameObject val = Object.Instantiate(m_additionalDamageNumObj);
			if (val == null)
			{
				return;
			}
			Utility.Attach(base._transform, val.get_transform());
			uIAdditionalDamageNum = val.GetComponent<UIAdditionalDamageNum>();
			if (uIAdditionalDamageNum == null)
			{
				Object.Destroy(val);
				return;
			}
			additionalDamageNumList.Add(uIAdditionalDamageNum);
		}
		groupOffet += additionalGroupOffset;
		if (!uIAdditionalDamageNum.Initialize(pos, damage, color, groupOffet, originalDamage, effective))
		{
			return;
		}
	}
Пример #3
0
	void Awake ()
	{
//		animator = gameObject.GetComponent<Animator>();
		m_animation = gameObject.GetComponent<Animation> ();
		m_curAnim = "";

//		SkillNum = Skills.Length;
		Guid = Game.GetInstance().actorGuid++;
		string guidStr = Guid.ToString ();

		m_damageNum = gameObject.AddMissingComponent<UIDamageNum>();
		m_healNum = gameObject.AddMissingComponent<UIHealNum>();
		m_originPosition = transform.position;
		m_targetPosition = m_originPosition;
		m_originRotation = transform.rotation;
		m_targetRotation = m_originRotation;
		m_fMoveSpeed = 0;
		m_fTurnSpeed = 0;
		m_bResetRotationAfter = false;
		m_bMoving = false;

		m_bIsBeCatch = false;
		m_hurtEff = new List<GameObject>();
	}
Пример #4
0
    public bool Initialize(Vector3 pos, int damage, DAMAGE_COLOR color, int groupOffset, UIDamageNum originalDamage, int effective)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0002: Unknown result type (might be due to invalid IL or missing references)
        //IL_0202: Unknown result type (might be due to invalid IL or missing references)
        //IL_0207: Unknown result type (might be due to invalid IL or missing references)
        //IL_0221: Unknown result type (might be due to invalid IL or missing references)
        //IL_0226: Unknown result type (might be due to invalid IL or missing references)
        //IL_022d: Unknown result type (might be due to invalid IL or missing references)
        //IL_02a3: Unknown result type (might be due to invalid IL or missing references)
        worldPos    = pos;
        worldPos.y += offsetY;
        float num  = (float)Screen.get_height() / (float)MonoBehaviourSingleton <UIManager> .I.uiRoot.manualHeight;
        float num2 = (float)Screen.get_width() / (float)MonoBehaviourSingleton <UIManager> .I.uiRoot.manualWidth;

        higthOffset_f = (float)(damadeNum.height * groupOffset) * heightOffsetRatio * num;
        widthOffset   = (float)damadeNum.width * 0.2f * (float)groupOffset * num2;
        if (null != damageNormal && null != damageGood && null != damageBad)
        {
            float num3 = 1f;
            if (effective == 0)
            {
                damageNormal.SetActive(true);
                damageGood.SetActive(false);
                damageBad.SetActive(false);
                animPos   = animPosNormal;
                animScale = animScaleNormal;
                damadeNum = damageNumNormal;
            }
            else if (0 < effective)
            {
                damageNormal.SetActive(false);
                damageGood.SetActive(true);
                damageBad.SetActive(false);
                animPos   = animPosGood;
                animScale = animScaleGood;
                damadeNum = damageNumGood;
                color     = DAMAGE_COLOR.GOOD;
                num3      = 1.2f;
            }
            else
            {
                damageNormal.SetActive(false);
                damageGood.SetActive(false);
                damageBad.SetActive(true);
                animPos   = animPosBad;
                animScale = animScaleBad;
                damadeNum = damageNumBad;
                color     = DAMAGE_COLOR.BAD;
            }
            higthOffset_f *= num3;
            widthOffset   *= num3;
        }
        if (groupOffset == 0 && 0 >= effective)
        {
            animScale.from = new Vector3(1f, 1f, 1f);
            animScale.to   = new Vector3(1f, 1f, 1f);
        }
        if (!SetPosFromWorld(worldPos))
        {
            return(false);
        }
        enable         = true;
        damadeNum.text = damage.ToString();
        ChangeColor(color, damadeNum);
        if (animPos != null)
        {
            animPos.ResetToBeginning();
        }
        if (animScale != null)
        {
            animScale.ResetToBeginning();
        }
        this.StartCoroutine(DirectionNumber());
        return(true);
    }
Пример #5
0
	protected NormalActor()
	{
		name = "";
		icon = "";

		m_master = null;
		m_target = null;
		
		Skills = null;
		SkillJson = null;

		m_damageNum = null;
		m_healNum = null;

		m_hurtEff = null;
	}