// 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; }
// 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>(); }
// Use this for initialization void Start() { Sno = FindObjectOfType <SnowBall>(); //Sno = this.gameObject.GetComponent<SnowBall>(); StartCoroutine(rang()); stat = FindObjectOfType <NG_StatManager>(); }
// Use this for initialization public override void Start() { base.Start(); collisions.faceDir = 1; playerScript = GetComponent <NG_Player>(); //Getting reference to the player input script so I can make the player slip on ice. -NG playerStats = GetComponent <NG_StatManager>(); }
// Use this for initialization void Start() { playerStats = GameObject.Find("PlayerCharacter").GetComponent <NG_StatManager>(); tripWire = gameObject.transform.GetChild(0).GetComponent <Collider2D>(); rb = gameObject.GetComponent <Rigidbody2D>(); inactiveGravity = rb.gravityScale; }
// Use this for initialization void Start() { //Find NG_StatManager on Player PlayerStats = FindObjectOfType <NG_StatManager>(); Sound = FindObjectOfType <SoundManager>(); CPM = FindObjectOfType <CheckpointManager>(); //StartCoroutine(drip()); }
// Use this for initialization void Start() { timeText = GetComponent <Text>(); TimeoD = FindObjectOfType <NG_StatManager>(); soundManager = FindObjectOfType <SoundManager>(); tempTime = startTime; maxTime = startTime; }
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(); }
// Use this for initialization void Start() { player = FindObjectOfType <NG_Player>(); stats = FindObjectOfType <NG_StatManager>(); if (player.transform.localScale.x < 0) { angle.x = -angle.x; } stats.Energy.CurrentVal -= NRG; }
private NG_EnemyStatManager enemyStats; //Reference to Enemy stats -NG // Use this for initialization void Start() { target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform> (); CPM = FindObjectOfType <CheckpointManager>(); SM = FindObjectOfType <SoundManager>(); //Get NG_StatManager & NG_EnemyStatManager -NG playerStats = FindObjectOfType <NG_StatManager>(); enemyStats = GetComponent <NG_EnemyStatManager>(); }
// Use this for initialization void Start() { //Find NG_StatManager on Player PlayerStats = FindObjectOfType <NG_StatManager>(); if (chkPntDown.activeInHierarchy == true) { chkPntUp.SetActive(false); } Tm = FindObjectOfType <TimeManager>(); }
// Use this for initialization void Start() { player = FindObjectOfType <PlayerController> (); RB = FindObjectOfType <Rigidbody2D>(); SM = FindObjectOfType <NG_StatManager>(); sound = FindObjectOfType <SoundManager>(); if (player.transform.localScale.x < 0) { speed = -speed; } }
//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() { RB = GetComponent <Rigidbody2D>(); SM = FindObjectOfType <NG_StatManager>(); sound = FindObjectOfType <SoundManager>(); //Assigning the player script -NG player = FindObjectOfType <NG_Player>(); sound.snoSound(); SM.Energy.CurrentVal--; SM.Energy.CurrentVal--; //Check to see if the player is facing left -NG if (player.transform.localScale.x < 0) { throwSpeed = -throwSpeed; } }
private void Start() { playerStats = FindObjectOfType <NG_StatManager>(); upgradeMenu = FindObjectOfType <NG_UpgradeMenu>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); score = FindObjectOfType <ScoreManager>(); if (score == null) { Debug.Log("ScoreManager didn't load between scenes."); } highestShards = score.shardCount; highestHealth = playerStats.Health.MaxVal; highestEnergy = playerStats.Energy.MaxVal; highestLives = playerStats.MaxLives; }
// Use this for initializati void Start() { Manager = FindObjectOfType <NG_StatManager> (); rb = GetComponent <Rigidbody2D> (); Shoot = FindObjectOfType <KA_AIShoot> (); if (Shoot.transform.localScale.x < 0) { speed = -speed; } player = GameObject.FindGameObjectWithTag("Player").transform; //target = new Vector2 (player.position.x, player.position.y); }
// Use this for initialization void Start() { SM = FindObjectOfType <SoundManager>(); RB = GetComponent <Rigidbody2D>(); stat = FindObjectOfType <NG_StatManager>(); SM.snoSound(); //Assigning the player script -NG player = FindObjectOfType <NG_Player>(); weapon = FindObjectOfType <NG_Weapon>(); stat.Energy.CurrentVal -= NRG; player.CurBallCost = NRG; //Check to see if the player is facing left -NG if (player.transform.localScale.x < 0) { throwSpeed = -throwSpeed; } }
// Use this for initialization void Start() { player = FindObjectOfType <NG_Player>(); playerStats = FindObjectOfType <NG_StatManager>(); sounds = FindObjectOfType <SoundManager>(); }
// Use this for initialization void Start() { SM = FindObjectOfType <NG_StatManager>(); sound = FindObjectOfType <SoundManager>(); }
// Use this for initialization void Start() { SM = FindObjectOfType <NG_StatManager>(); sound = FindObjectOfType <SoundManager>(); StartCoroutine(SpikeHit()); }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody2D>(); stats = FindObjectOfType <NG_StatManager>(); }
// Use this for initialization void Start() { RB = FindObjectOfType <Rigidbody2D>(); SM = FindObjectOfType <NG_StatManager>(); sound = FindObjectOfType <SoundManager>(); }
private void Start() { playerStats = GameObject.Find("PlayerCharacter").GetComponent <NG_StatManager>(); normalColor = fallPlat.GetComponent <SpriteRenderer>().color; }
private void Start() { Stat = FindObjectOfType <NG_StatManager>(); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); stat = FindObjectOfType <NG_StatManager>(); SM = FindObjectOfType <SoundManager>(); }