void Awake() { self = this; player_normal_jump_height = (int)Camera.main.orthographicSize - 5 + 8; player_jump_height = player_normal_jump_height; }
// Use this for initialization void Start() { penguin = GetComponent <Penguin>(); bodyPartManager = GameObject.FindGameObjectWithTag("BodyPartManager").GetComponent <BodyPartManager>(); agent = GetComponent <NavMeshAgent>(); heightManager = GetComponent <HeightManager>(); }
// Use this for initialization void Start() { bodyPartManager = GameObject.FindGameObjectWithTag("BodyPartManager").GetComponent <BodyPartManager>(); anim = GetComponent <Animator>(); penguin = GetComponentInParent <Penguin>(); navManager = GetComponentInParent <NavManager>(); heightManager = GetComponentInParent <HeightManager>(); }
void Start() { GameObject g = GameObject.Find("ScoreManager"); if (g != null) { KillManager = g.GetComponent <KillManager>(); HeightManager = g.GetComponent <HeightManager>(); } }
void Awake() { _instance = this; }
void Start() { HeightManager = GameObject.Find("ScoreManager").GetComponent <HeightManager>(); }