// Called when a PlanetTransmitterComponent's raycast hits this object // sendingPlanet parameter currently unused but could be used for behavior for receiving specific transmissions from specific planets public void ReceiveTransmission(PlanetTransmitterComponent sendingPlanet) { OnReceiveTransmission.Invoke(); // Call all the functions under this event in the editor state = ReceiverState.ACTIVATED; //isAlreadyActivated = true; // Toggle this on, so that it can't get activated again (temp to avoid multiple physics calls per frame) EnableGlow(Color.green); // For debugging //Debug.LogFormat("Activated by {0}!", sendingPlanet.name); //this.GetComponent<MeshRenderer>().material.color = Color.green; }
private void Awake() { satellite.planet = this.transform; planetTransmitter = this.GetComponent <PlanetTransmitterComponent>(); planetTransmitter.enabled = false; }