private void Start() { playerTrans = GameObject.Find("Player").transform; focus_light = focus_light_trans.GetComponent <Light>(); quests = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>(); SC = GetComponent <SphereCollider>(); rb = GetComponent <Rigidbody>(); cursorLogic = GameObject.Find("Master Object").GetComponent <CursorLogic>(); focus_light_trans.localEulerAngles = new Vector3(focusLightAngle, 0f, 0f); }
// Start is called before the first frame update void Start() { forward = new Vector3(1 / Mathf.Sqrt(2), 0, 1 / Mathf.Sqrt(2)); heldRotation = 0f; forward = Vector3.Normalize(forward); side = Quaternion.Euler(new Vector3(0, 90, 0)) * forward; rb = GetComponent <Rigidbody>(); animationUpdater = GetComponentInChildren <PlayerAnimationUpdater>(); energy = GameObject.Find("Player").GetComponent <Energy>(); ap = GameObject.Find("Player").GetComponentInChildren <ActivePerks>(); cursorLogic = GameObject.Find("Master Object").GetComponent <CursorLogic>(); WC = GetComponentInChildren <WeaponController>(); }
private void Awake() { Assert.IsTrue(cooldown >= STARTUP_DECLARATIONS.AbilityAnimationCastTime[(int)abilityAnimation]); Player = GameObject.Find("Player").transform; eventQueue = GameObject.Find("EventDisplay").GetComponent <EventQueue>(); activePerks = Player.GetComponentInChildren <ActivePerks>(); cursorLogic = GameObject.Find("Master Object").GetComponent <CursorLogic>(); playerMovement = Player.GetComponent <PlayerMovement>(); energy = Player.GetComponent <Energy>(); animationUpdater = Player.GetComponentInChildren <PlayerAnimationUpdater>(); weaponController = Player.GetComponentInChildren <WeaponController>(); abilitiesController = Player.GetComponentInChildren <AbilitiesController>(); PlayerProjectiles = GameObject.Find("PlayerProjectiles").transform; playerStats = Player.GetComponent <PlayerStats>(); cooldown_remaining = 0f; // current_level = 1; current_xp = 0; // }