public void Start() { _active = false; _cooldown = Time.time + _deadTime; _animator = GetComponent <Animator>(); _animator.SetBool("isActive", false); StunData s = new StunData(); s.isEmpty = true; DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = true; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData sc = new FearData(); sc.isEmpty = true; SlowOverAreaData sla = new SlowOverAreaData(); sla.isEmpty = true; DamageOverAreaData dma = new DamageOverAreaData(); dma.isEmpty = true; EnhanceData en = new EnhanceData(); en.isEmpty = false; en.value = _multiplier; _myEffect = new Effects(sl, s, d, dm, sc, true, sla, dma, en); }
public void Start() { StunData s = new StunData(); s.isEmpty = true; s.time = 20; DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = false; d.time = 20; d.damage = 3; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData sc = new FearData(); sc.isEmpty = false; sc.whatScareMe = LayerMask.GetMask("player"); sc.timeOfFear = 15; //myEffect = new Effects(sl, s, d, dm,sc); }
public void Start() { StunData s = new StunData(); s.isEmpty = true; DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = true; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData sc = new FearData(); sc.isEmpty = true; SlowOverAreaData sla = new SlowOverAreaData(); sla.isEmpty = false; sla.speed = 1; DamageOverAreaData dma = new DamageOverAreaData(); dma.isEmpty = true; EnhanceData en = new EnhanceData(); en.isEmpty = false; en.value = 0.15f; myEffect = new Effects(sl, s, d, dm, sc, true, sla, dma, en); }
public void Start() { StunData s = new StunData(); s.isEmpty = true; DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = false; d.time = _time; d.damage = _dmg; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData sc = new FearData(); sc.isEmpty = true; SlowOverAreaData sla = new SlowOverAreaData(); sla.isEmpty = true; DamageOverAreaData dma = new DamageOverAreaData(); dma.isEmpty = true; EnhanceData en = new EnhanceData(); en.isEmpty = true; myEffect = new Effects(sl, s, d, dm, sc, false, sla, dma, en); }
public void Start() { StunData s = new StunData(); s.isEmpty = true; DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = true; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData sc = new FearData(); sc.isEmpty = true; SlowOverAreaData sla = new SlowOverAreaData(); sla.isEmpty = true; DamageOverAreaData dma = new DamageOverAreaData(); dma.isEmpty = false; dma.damage = 0.08f; EnhanceData en = new EnhanceData(); en.isEmpty = true; myEffect = new Effects(sl, s, d, dm, sc, true, sla, dma, en); _animator = GetComponent <Animator>(); _animator.SetBool("isActive", false); }
public void Awake() { StunData s = new StunData(); s.isEmpty = false; s.time = 1.5f; // freezes on place for 4 sec DamageOverTimeData d = new DamageOverTimeData(); d.isEmpty = true; SlowData sl = new SlowData(); sl.isEmpty = true; DamageData dm = new DamageData(); dm.isEmpty = true; FearData fear = new FearData(); fear.isEmpty = true; SlowOverAreaData slowArea = new SlowOverAreaData(); slowArea.isEmpty = true; DamageOverAreaData dmgArea = new DamageOverAreaData(); dmgArea.isEmpty = true; EnhanceData enhance = new EnhanceData(); enhance.isEmpty = true; myEffect = new Effects(sl, s, d, dm, fear, false, slowArea, dmgArea, enhance); if (gameObject.transform.position.x > 0) { direction.x *= -1f; } }
public Effects(SlowData slow, StunData stun, DamageOverTimeData dmgT, DamageData dmg, FearData fear, bool isZone, SlowOverAreaData slowArea, DamageOverAreaData dmgArea, EnhanceData en) { _stun = stun; _slow = slow; _damageOverTime = dmgT; _damage = dmg; _fear = fear; _isZone = isZone; _slowOverArea = slowArea; _damageOverArea = dmgArea; _enhance = en; }
public override void Update() { base.Update(); try{ _iceCrow.setPlayerPosition(_iceCrow.isPlayerInAggroRange()); if (!_iceCrow.IsIneluttable()) { if (_secondCounter <= _distToHalja) //just a simple animation { _secondCounter += .1f / _lineDrawSpeed; float x = Mathf.Lerp(0, _distToHalja, _secondCounter); Vector3 pointA = _spitPosition; Vector3 pointB = _iceCrow.GetHalja().getThrowChainPosition().position; Vector3 pointAngleLine = x * Vector3.Normalize(pointB - pointA) + pointA; _secondLr.SetPosition(1, pointAngleLine); } } if (_counter <= _dist) //just a simple animation { _counter += .1f / _lineDrawSpeed; float x = Mathf.Lerp(0, _dist, _counter); Vector3 pointA = _spitPosition; Vector3 pointB = _waterCrow.getThrowChainPosition().position; Vector3 pointAngleLine = x * Vector3.Normalize(pointB - pointA) + pointA; _lineRenderer.SetPosition(1, pointAngleLine); } _lineRenderer.SetPosition(0, _spitPosition); _lineRenderer.SetPosition(1, _waterCrow.getThrowChainPosition().position); if (!_iceCrow.IsIneluttable()) { _secondLr.SetPosition(0, _spitPosition); _secondLr.SetPosition(1, _iceCrow.GetHalja().getThrowChainPosition().position); } RaycastHit Hit; if (Physics.Raycast(_spitPosition, (_waterCrow.getThrowChainPosition().position - _spitPosition).normalized, out Hit, Vector3.Distance(_spitPosition, _waterCrow.getThrowChainPosition().position), LayerMask.GetMask("Player"))) { StunData st = new StunData(); st.isEmpty = false; st.time = 3f; Hit.collider.gameObject.GetComponent <PlayerStatus>().AddStatus(new Effects(new SlowData(), st, new DamageOverTimeData(), new DamageData(), new FearData(), false, new SlowOverAreaData(), new DamageOverAreaData(), new EnhanceData())); } if (!_iceCrow.IsIneluttable()) { if (Physics.Raycast(_spitPosition, (_iceCrow.GetHalja().getThrowChainPosition().position - _spitPosition).normalized, out Hit, Vector3.Distance(_spitPosition, _iceCrow.GetHalja().getThrowChainPosition().position), LayerMask.GetMask("Player"))) { StunData st = new StunData(); st.isEmpty = false; st.time = 3f; Hit.collider.gameObject.GetComponent <PlayerStatus>().AddStatus(new Effects(new SlowData(), st, new DamageOverTimeData(), new DamageData(), new FearData(), false, new SlowOverAreaData(), new DamageOverAreaData(), new EnhanceData())); } } if (Time.time >= _begin + _iceCrow.getUnbreakableBondDuration()) { _stateMachine.ChangeState(_iceCrow._MoveState); } }catch (NullReferenceException e) { _stateMachine.ChangeState(_iceCrow._MoveState); }catch (MissingReferenceException m) { _stateMachine.ChangeState(_iceCrow._MoveState); } }