public virtual void OnTriggerEnter(Collider other) { if (other.tag == StaticStrings.helper || other.tag == StaticStrings.player || other.tag == StaticStrings.tower || other.tag == StaticStrings.AI || other .tag == StaticStrings.cpu) { IHealth h = other.GetComponent <IHealth>(); if (h != null) { h.takeDamage(damage); } if (attacker != null) { attacker.Add_SkillPoints(1); } Effect(other, attacker); if (Soundmanager.instance != null) { Soundmanager.instance.PlaySeByName(StaticStrings.Splat1); } Destroy(gameObject); } }
//contructor public PlayerCPU(Animator an, B_Player p, NavMeshAgent ag, STATUS st, Transform thisTran) { status = st; anim = an; targetCheckCounter = targetCheckTimer; player = p; agent = ag; attackTimer = status.getCurrentweapon.attackdelay; thisTransform = thisTran; target = player.enemyList[0].transform; player.manaIsFull += onManaIsFull; player.takeIngredient += useIngredient; int rand = UnityEngine.Random.Range(50, 98); player.Add_SkillPoints(rand); }
//マナーポイントアップ void PowerUp_Add_SkillPoints(float value) { player.Add_SkillPoints(value); }