// Start is called before the first frame update override public void Initialise() { if (wheel == null) { wheel = DirectionChoice.Instance; } // Find the sprite with the beacon on SpriteRenderer[] srs = GetComponentsInChildren <SpriteRenderer>(); foreach (SpriteRenderer sr in srs) { if (sr.gameObject != gameObject) { beaconSprite = sr; break; } } librarian = FindObjectOfType <BitWorldLibrarian>(); base.Initialise(); StartBeaconInfo(); // Set beacon sprite info beaconSprite.color = BitWorldKnowledge.Instance.AirColourByWavelength[beaconOutput]; beaconSprite.sprite = librarian.BeaconSprites[(int)pickup]; beaconSprite.transform.eulerAngles = new Vector3(0, 0, 360 - (int)direction * 90); // Give late start method to delegate FindObjectOfType <BitWorldMaker>().LateStartCall += LateStart; // Set input delegates InputManager im = InputManager.Instance; im.ChangeBeaconCall += RotateOutput; im.RotateBeaconCall += RotateDirection; im.PickupCall += ChoosingPickup; im.ChooseDirectionCall += ChoosingDirection; im.SelectionCall += ResolveChoice; }
private void Start() { dc = GetComponentInParent <DirectionChoice>(); }
private void Awake() { instance = this; }