protected void Awake() { _orbitAttack = this.SearchComponent <OrbitAttack>(); _coll = GetComponent <Collider2D>(); _coll.enabled = false; if (!_orbitAttack.enabled) { EndEnable(); } }
public static OrbitAttack AddOrbitAttack(GameObject gameObject, bool addAnotherOne, float numberOfParticles, float damage, float speed, float Reach, float anglespeedDEG, float maxradius, float particleSize, float throwtime) { if (addAnotherOne || gameObject.SearchComponent <OrbitAttack>() == null) { GameObject orbitattackgmbjct = gameObject.GetCharacter().AddAttacks(WeaponsStaticClass.orbitAttack, addAnotherOne); orbitattackgmbjct.AddComponent <OrbitAutoAttack>().TimeToThrow = throwtime; OrbitAttack orbitvars = orbitattackgmbjct.SearchComponent <OrbitAttack>(); if (numberOfParticles >= 0) { orbitvars.NumberOfParticles = (int)numberOfParticles; } else { orbitvars.NumberOfParticles = (int)(-numberOfParticles * orbitvars.NumberOfParticles); } if (damage >= 0f) { orbitvars.SetDamage(damage); } else { orbitvars.SetDamage(-damage * orbitvars.Damage); } if (speed >= 0f) { orbitvars.Speed = speed; } else { orbitvars.Speed *= -speed; } if (Reach >= 0f) { orbitvars.Reach = Reach; } else { orbitvars.Reach *= -Reach; } if (anglespeedDEG >= 0f) { orbitvars.AngularSpeedDegrees = anglespeedDEG; } else { orbitvars.AngularSpeedDegrees *= -anglespeedDEG; } if (maxradius >= 0f) { orbitvars.MaxRadius = maxradius; } else { orbitvars.MaxRadius *= -maxradius; } if (particleSize >= 0f) { orbitvars.ParticleSize = particleSize; } else { orbitvars.ParticleSize *= -particleSize; } return(orbitvars); } return(null); }
public OribtAttackSpawnedState(AttackStateMachine ASM, OrbitAttack orbitAttack) : base(ASM, orbitAttack) { }
public OrbitAttackThrownState(AttackStateMachine ASM, OrbitAttack orbitAttack) : base(ASM, orbitAttack) { }
protected OrbitAttackState(AttackStateMachine ASM, OrbitAttack orbitAttack) : base(ASM) { _orbitAttack = orbitAttack; }