public virtual void Init() { _PlayedCastingAudio = _PlayedChannelingAudio = false; if (_ChannelingParticle != null) { ParticleInterface ChannelingParticlePI = _ChannelingParticle.GetComponent <ParticleInterface>(); ChannelingParticlePI.Init(); _ChannelingTimer = ChannelingParticlePI.GetLongestParticleEffect(); //Debug.Log("Channeling Particle: " + _ChannelingTimer); } else { _ChannelingTimer = _ChannelingTime; } if (_CastingParticle != null) { ParticleInterface CastingParticlePI = _CastingParticle.GetComponent <ParticleInterface>(); CastingParticlePI.Init(); _CastingTimer = CastingParticlePI.GetLongestParticleEffect(); //Debug.Log("Casting Particle: " + _CastingTimer); } else { _CastingTimer = _CastingTime; } _Multiplyer = ((_SkillTier != null) ? _SkillTier.GetMultiplyer() : 1); _ScreenShakeTimer = 0; }
protected virtual void Update() { _state.Tick(); _status.UpdateStatMultiplyer(ref _properties); TakeDamage(_status.GetValue(EnumHolder.EffectType.TAKEDAMAGE)); if (gameObject.transform.localScale.x != _tier.GetMultiplyer()) { gameObject.transform.localScale = new Vector3(_tier.GetMultiplyer(), _tier.GetMultiplyer(), _tier.GetMultiplyer()); } //もし一定高度以下(落下したら) if (gameObject.transform.position.y <= -2) { //死ぬ Die(); } }
public override List <GameObject> GetTargets(ref Vector3 casting_position, ref SkillTier tier, ref GameObjectList targets, ref GameObject caster) { List <GameObject> list = new List <GameObject>(); foreach (GameObject obj in targets.GetList()) { if (ObjectManager.Instance.GetActiveObjects(obj) != null) { foreach (GameObject entity in ObjectManager.Instance.GetActiveObjects(obj)) { if (Vector3.Distance(casting_position, entity.transform.position) < _Range * ((tier != null) ? tier.GetMultiplyer() : 1)) { list.Add(entity); } } } } return(list); }