// Use this for initialization void Start() { _PGS = gameObject.GetComponent <ArcReactor_Launcher>(); _hm = Owner.GetComponent <HealthModule>(); if (Owner.GetComponent <WeaponModule>()) { _sbwm = Owner.GetComponent <WeaponModule>(); starship = false; starbase = true; } if (Owner.GetComponent <Stats>()) { _st = Owner.GetComponent <Stats>(); _as = Owner.GetComponent <ActiveState>(); starship = true; starbase = false; } if (gameObject.GetComponent <AudioSource>()) { _a = gameObject.GetComponent <AudioSource>(); _a.maxDistance = 1000; _a.spatialBlend = 0.8f; } }
protected IEnumerator TrackHit(SingleLaserHit hit, ArcReactor_Launcher launcher) { while (hit.hitLastFrame || hit.hitThisFrame) { yield return(new WaitForEndOfFrame()); hit.hitLastFrame = hit.hitThisFrame; hit.hitThisFrame = false; } DoHitEnd(hit, launcher); }
void Start() { totalPopulation = 0; planetList = new Dictionary <Role_Type, int>(); planetList[Role_Type.WATER] = 0; planetList[Role_Type.FIRE] = 0; planetList[Role_Type.IRON] = 0; planetList[Role_Type.TREE] = 0; waterTime = 0f; ironTime = 0f; treeTime = 0f; fireTime = 0f; aLauncher = GetComponent <ArcReactor_Launcher>(); config = PlanetConfManager.Instance.GetConfById(id); }
public void DoHitEnd(SingleLaserHit hit, ArcReactor_Launcher launcher) { hit.particles.enableEmission = false; hit.particles.gameObject.SetActive(false); allLaserHits.Remove(launcher); }