Beispiel #1
0
    private void Awake()
    {
        health.Initialize();
        mana.Initialize();
        ammo.Initialize();

        gun1  = GameObject.FindObjectOfType <egunsatu> ();
        gun2  = GameObject.FindObjectOfType <egundua> ();
        gun3  = GameObject.FindObjectOfType <eguntiga> ();
        gun4  = GameObject.FindObjectOfType <egunempat> ();
        gun5  = GameObject.FindObjectOfType <egunlima> ();
        rkt1  = GameObject.FindObjectOfType <erocketsatu> ();
        rkt2  = GameObject.FindObjectOfType <erocketdua> ();
        rkt3  = GameObject.FindObjectOfType <erockettiga> ();
        rkt4  = GameObject.FindObjectOfType <erocketempat> ();
        rkt5  = GameObject.FindObjectOfType <erocketlima> ();
        ulet1 = GameObject.FindObjectOfType <ebossulet1> ();
        ulet2 = GameObject.FindObjectOfType <ebossulet2> ();
        ulet3 = GameObject.FindObjectOfType <ebossulet3> ();
        ulet4 = GameObject.FindObjectOfType <ebossulet4> ();
        ulet5 = GameObject.FindObjectOfType <ebossulet5> ();
    }
Beispiel #2
0
 void Awake()
 {
     ehealth.Initialize();
 }
Beispiel #3
0
    void Awake()
    {
        surship = GameObject.FindObjectOfType <survivalship> ();

        health.Initialize();
    }
Beispiel #4
0
    //private void Awake()
    // {
    // hitPoints.Initialize();
    // }

    // Use this for initialization
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();


        if (!rb)
        {
            Debug.LogWarning("No Rigidbody2D Found.");
        }
        if (speed <= 0)
        {
            speed = 5.0f;

            Debug.LogWarning("Default speeding to " + speed);
        }

        if (jumpForce <= 0)
        {
            jumpForce = 5.5f;

            Debug.LogWarning("Default jumping force to " + jumpForce);
        }

        if (groundCheckRadius <= 0)
        {
            groundCheckRadius = 0.5f;

            Debug.LogWarning("Default GrChRas to " + groundCheckRadius);
        }

        if (!groundCheck)
        {
            Debug.LogWarning("No Ground Check found");
        }

        anim = GetComponent <Animator>();
        if (!anim)
        {
            Debug.LogWarning("No Animator Found.");
        }

        if (!projectSpawnPoint)
        {
            Debug.LogWarning("No spawn point found");
        }

        if (!starPowerPrefab)
        {
            Debug.LogWarning("No prefab found");
        }

        if (starPowerForce == 0)
        {
            starPowerForce = 7.0f;
            Debug.LogWarning("Projectile force not set. Projectile force now set to " + starPowerForce);
        }

        if (!throwProPrefab)
        {
            Debug.LogWarning("No prefab found");
        }

        if (throwProForce == 0)
        {
            throwProForce = 7.0f;
            Debug.LogWarning("throwPro force not set. throPro force now set to " + throwProForce);
        }

        if (jmpCnt == 0)
        {
            jmpCnt = 4;
            Debug.LogWarning("Jump count now set to " + jmpCnt);
        }

        /*if (hitPoints == 0)
         * {
         *  hitPoints = 100;
         *  Debug.LogWarning("Hit Points set to " + hitPoints);
         *
         * }*/

        hitPoints.Initialize();
    }