// Use this for initialization void Start() { upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); fullWalletNotification = GameObject.Find("UpgradeNotification"); //fullWalletText = fullWalletNotification.gameObject.transform.Find("FullWalletText").GetComponent<Text>(); }
// Use this for initialization void Start() { RB = GetComponent <Rigidbody2D>(); curBall = snowBall; anim = GetComponent <Animator>(); canShoot = true; playerGraphics = gameObject.transform.Find("Graphics"); if (playerGraphics == null) { Debug.Log("No object 'Graphics' can be found as a child of the Player."); } forcePush = this.transform.Find("ForcePush").gameObject; wallCheckPoint = playerGraphics.Find("WallCheck"); //Find NG_StatManager on Player Nrg = FindObjectOfType <NG_StatManager>(); //var upgrades = GameObject.Find("UpgradeMenu"); //Upgrades = upgrades.GetComponent<NG_UpgradeMenu>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); //iceLaunch = FindObjectOfType<NG_IceLaunch>(); //if (iceLaunch == null) //return; BC = FindObjectOfType <BatChase>(); icicle = FindObjectOfType <IcicleFall>(); }
void Start() { theSM = FindObjectOfType <ScoreManager> (); Sound = FindObjectOfType <SoundManager>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); TP = FindObjectOfType <TimeManager>(); }
// Use this for initialization void Start() { //Finding Scripts controller2D = GetComponent <NG_CharacterController2D>(); Nrg = FindObjectOfType <NG_StatManager>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); animator = GetComponent <Animator>(); //Finding components/Children objects rb = GetComponent <Rigidbody2D>(); playerGraphics = gameObject.transform.Find("Graphics"); if (playerGraphics == null) { Debug.Log("No object 'Graphics' can be found as a child of the Player."); } if (playerGraphics != null) { graphicScale = playerGraphics.transform.localScale; } arm = GetComponentInChildren <NG_ThrowArm>().transform; curBall = snowBall; canShoot = true; gravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2); maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight); print("Gravity: " + gravity + " Jump Velocity: " + maxJumpVelocity); }
// Use this for initialization void Start() { Stat = FindObjectOfType <NG_StatManager>(); weapon = FindObjectOfType <NG_Weapon>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); normalColor = GetComponent <SpriteRenderer>().color; }
private void OnEnable() { player = FindObjectOfType <NG_Player>(); playerStats = FindObjectOfType <NG_StatManager>(); playerWeapon = FindObjectOfType <NG_Weapon>(); scoreManager = FindObjectOfType <ScoreManager>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); UpdateValues(); }
//***************************************************************** private void Awake() { if (UpgradeProgress) { DestroyImmediate(gameObject); } else { DontDestroyOnLoad(gameObject); UpgradeProgress = this; } }
//pushback getters and setters************************************* /*public float Pushback * { get { return pushback; } set { pushback = value; } } * public float PushbackDistance * { get { return pushbackDistance; } set { pushbackDistance = value; } } * public float PushbackTimer * { get { return pushbackTimer; } set { pushbackTimer = value; } } * public bool PushedFromRight * { get { return pushedFromRight; } set { pushedFromRight = value; } }*/ //******************************************************************* //actually we are using this for initialization -NG private void Awake() { enemyHealth.Initialize(); healthBarFollow = GetComponent <NG_BarFollow>(); if (healthBarFollow == null) { Debug.Log("NG_BarFollow.cs has not been assigned to the enemy."); } Stat = FindObjectOfType <NG_StatManager>(); weapon = FindObjectOfType <NG_Weapon>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); tmpSpeed = moveSpeed; }
// Use this for initialization void Start() { playerControl = FindObjectOfType <NG_Player>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); pauseMenu = FindObjectOfType <PauseMenu>(); //ammoSelectUI = GameObject.Find("AmmoSelectUI"); menuItems = buttons.Count; foreach (MenuButton button in buttons) { button.buttonImage.color = button.idleColor; } curMenuItem = 0; oldMenuItem = 0; curMenuDisplay = GameObject.Find("CurProjectileFrame").transform.GetChild(0).gameObject; curProjectileSprite = curMenuDisplay.GetComponent <Image>(); }
// Use this for initialization void Start() { checkPoint = FindObjectOfType <CheckpointManager>(); Score = FindObjectOfType <ScoreManager>(); enemyStats = FindObjectOfType <NG_EnemyStatManager>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); audio = FindObjectOfType <SoundManager>(); controller2D = GetComponent <NG_CharacterController2D>(); LoadPlayerUpgrades(); health.CurrentVal = health.MaxVal; maxLives = upgradeProgress.highestLives; curLives = maxLives; //health.MaxVal = 3; //energy.MaxVal = 10; }
// Use this for initialization void Start() { //UpdateValues(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); }
// Use this for initialization void Start() { upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); popup = FindObjectOfType <NG_UnlockPopup>(); }