/* * ========================= * === FRAMEWORK METHODS === * ========================= */ private void Awake() { /* * initialise important components for framework */ // initialize markers to important objects playerObject = gameObject; parentObject = gameObject.transform.parent.gameObject; // initialize instances Instance = GetComponent <PlayerController>(); ghostingEffect = GetComponent <GhostingEffect>(); soundController = SoundController.Instance; morphIndicator = MorphIndicator.Instance; scriptedEvents = ScriptedEventsManager.Instance; // initialize physic components rb2d = GetComponent <Rigidbody2D>(); triangleLineRenderer = GetComponent <LineRenderer>(); // load morphing sprites into memory loadMorphAnimationSprites(); Log.Print($"Initialised player with parent object '{parentObject.name}'.", parentObject); OnAwake(); }
private void Awake() { Instance = this; initialize(); }