public override void OnBeAttack(PlayerBasic attacker) { if ((this.thePlayer.ActerHp < 0 || this.thePlayer.isAlive == false) && thePlayerKilledThis == null) { //print ("dead"); thePlayerKilledThis = attacker; popSoulMove theSoul = systemValues.getPopSoul(); int soulCount = systemValues.soulGet(this.thePlayer); theSoul.makeSTART(attacker, soulCount); theSoul.transform.position = this.transform.position; } }
public static popSoulMove getPopSoul() { if (!theSoulProfab) { theSoulProfab = Resources.Load <GameObject> ("effects/theSoul"); } if (thePopSoul.Count <= 0) { GameObject theSoul = GameObject.Instantiate <GameObject> (theSoulProfab); theSoul.transform.SetParent(transStatic); return(theSoul.GetComponent <popSoulMove> ()); } else { popSoulMove A = thePopSoul [0]; A.gameObject.SetActive(true); thePopSoul.RemoveAt(0); return(A); } }
public static void savePopSoul(popSoulMove A) { thePopSoul.Add(A); A.gameObject.SetActive(false); }