void Update() { for (var i = 0; i < 4; ++i) { var pos = random_.NextFloat3(-100, 100); var dir = random_.NextFloat3Direction(); var rot = quaternion.LookRotation(dir, new float3(0, 1, 0)); MissileSystem.Instantiate(MissileManager.Prefab, pos, rot); } }
private static void LaunchMissile() { for (var i = 0; i < 5; i++) { var missile = new Curving(GetTriggerUnit(), GetSpellTargetX(), GetSpellTargetY()) { Curve = -90 + (45 * i) }; MissileSystem.Add(missile); } }
private static void LaunchMissile() { var missile = new Orbital(GetTriggerUnit(), GetSpellTargetUnit()) { Range = 600, OrbitalPeriod = 4.0f, SpinPeriod = 4.0f }; Util.Debug(missile.SpinPeriod); Util.Debug(missile.OrbitalPeriod); MissileSystem.Add(missile); }
void Awake() { rigidbody = GetComponent <Rigidbody2D>(); collider = GetComponent <Collider2D>(); missile = GetComponent <MissileSystem>(); var size = transform.GetChild(0).GetComponent <Renderer>().bounds.size; paddingX = size.x / 2f; paddingY = size.y / 2f; dodgeDuration = maxRoll / rollSpeed; rigidbody.gravityScale = 0f; waitForFireInterval = new WaitForSeconds(fireInterval); waitForOverdriveFireInterval = new WaitForSeconds(fireInterval / overdriveFireFactor); waitHealthRegenerateTime = new WaitForSeconds(healthRegenerateTime); waitDecelerationTime = new WaitForSeconds(decelerationTime); waitInvincibleTime = new WaitForSeconds(InvincibleTime); }
void Awake() { if (iCurMaxCount > missile_p) { iCurMaxCount = missile_p; } goMissileRoot = GameObject.Find("MissileRoot"); goMissileTraceRoot = GameObject.Find("MissileTraceRoot"); meshCone = new Mesh(); meshQuad = new Mesh(); meshIcon = new Mesh[9]; // 8种图标形状,下标1开始 Instance = this; CreateMesh(); for (int i = 0; i < missile_p; ++i) { list_missile.Add(new Missile(i /*, GTW.Instance.systems[1].DarkMis*/)); } // goPop = GameObject.Find("pop_attack"); // sprPopBack = GameObject.Find("background").GetComponent<UISprite>(); // iPopWidth = (int)(sprPopBack.localSize.x * goPop.transform.localScale.x); // iPopHeight = (int)(sprPopBack.localSize.y * goPop.transform.localScale.y); // lab_id = GameObject.Find("lab_id_val").GetComponent<UILabel>(); // lab_type = GameObject.Find("lab_type_val").GetComponent<UILabel>(); // lab_name = GameObject.Find("lab_name_val").GetComponent<UILabel>(); // lab_count = GameObject.Find("lab_count_val").GetComponent<UILabel>(); // lab_time = GameObject.Find("lab_time_val").GetComponent<UILabel>(); // lab_level = GameObject.Find("lab_level_val").GetComponent<UILabel>(); // lab_src_ip = GameObject.Find("lab_src_ip_val").GetComponent<UILabel>(); // lab_des_ip = GameObject.Find("lab_des_ip_val").GetComponent<UILabel>(); // lab_src_name = GameObject.Find("lab_src_name_val").GetComponent<UILabel>(); // lab_des_name = GameObject.Find("lab_des_name_val").GetComponent<UILabel>(); // goPop.SetActive(false); }
private static void LaunchMissile() { var missile = new Arcing(GetTriggerUnit(), GetSpellTargetX(), GetSpellTargetY()); MissileSystem.Add(missile); }
private static void LaunchMissile() { var missile = new Momentum(GetTriggerUnit(), GetSpellTargetUnit()); MissileSystem.Add(missile); }