// Use this for initialization
 void Start()
 {
     Stat            = FindObjectOfType <NG_StatManager>();
     weapon          = FindObjectOfType <NG_Weapon>();
     upgradeProgress = FindObjectOfType <NG_UpgradeProgress>();
     normalColor     = GetComponent <SpriteRenderer>().color;
 }
Example #2
0
 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();
 }
    //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;
    }
Example #4
0
    // 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;
        }
    }