public void FireDualLasers() { DualLasers dualLaser = Instantiate(dualLaserPrefab, transform.position, new Quaternion()) as DualLasers; dualLaser.owningPlayer = playerEnum; dualLaser.SetColor(player.playerColor); dualLaser.thisPlayer = this.player; }
protected override void Awake() { base.Awake(); maxHealth = 145; dualLaserPrefab = Resources.Load <DualLasers>("Prefabs/DualLasers"); chargeShotPrefab = Resources.Load <ChargeShot>("Prefabs/ChargeShot"); }
protected override void Awake() { base.Awake(); dualLaserPrefab = Resources.Load <DualLasers>("Prefabs/DualLasers"); chargeShotPrefab = Resources.Load <ChargeShot>("Prefabs/ChargeShot"); masochistShieldPrefab = Resources.Load <MasochistShield>("Prefabs/MasochistShield"); vampireShieldPrefab = Resources.Load <VampireShield>("Prefabs/VampireShield"); }
private Collider[] FindDualLaserAttacks(Collider[] allObjects) { List <Collider> lasers = new List <Collider>(); for (int i = 0; i < allObjects.Length; i++) { DualLasers thisLaser = allObjects[i].GetComponentInParent <DualLasers>(); if (thisLaser != null && thisLaser.owningPlayer != ai.thisShip.playerEnum) { lasers.Add(allObjects[i]); } } return(lasers.ToArray()); }
public void DualLaserAttack() { DualLasers dualLaser = Instantiate(dualLaserPrefab, transform.position, new Quaternion()) as DualLasers; dualLaser.owningPlayer = playerEnum; }