private void PlayHeal(Charactor c) { GameObject gameObject = (GameObject)MonoBehaviour.Instantiate(SkillObject_pre); SkillObject skillObject = gameObject.GetComponent <SkillObject>(); skillObject.res = 11; skillObject.loop = 1; skillObject.spriteAnimation.sortingLayerID = 3; skillObject.transform.position = c.transform.position; skillObject.transform.parent = c.transform; skillObject.transform.localScale = new Vector2(0.25f, 0.25f); skillObject.SetSpec(this.specSign); skillObjects.Add(skillObject); c.ChangeHP(-((int)attackOne.GetAttribute().atk *skillConfig.demageratio), false); }
public void PlayEffect(int type) { switch (type) { case 1: GameObject gameObject = (GameObject)MonoBehaviour.Instantiate(SkillObject_pre); SkillObject skillObject = gameObject.GetComponent <SkillObject>(); skillObject.res = 11; skillObject.loop = 1; skillObject.spriteAnimation.sortingLayerID = 3; skillObject.transform.position = transform.position; skillObject.transform.parent = transform; skillObject.transform.localScale = new Vector2(0.25f, 0.25f); skillObject.SetSpec(true); skillObjects.Add(skillObject); break; } }