Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     joint         = GetComponent <DistanceJoint2D>();
     joint.enabled = false;
     line.enabled  = false;
     inv           = GetComponent <playerInv>();
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     player  = GameObject.FindGameObjectWithTag("Player");
     brkwll  = GameObject.FindGameObjectWithTag("breakable");
     inv     = player.GetComponent <playerInv>();
     collman = player.GetComponent <collMan>();
 }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     player    = GameObject.FindGameObjectWithTag("Player");
     playerinv = player.GetComponent <playerInv>();
     move      = player.GetComponent <movement>();
     cspeed    = move.getMspeed() * 2;
     //incharge = false;
     lside   = GameObject.FindGameObjectWithTag("left");
     rside   = GameObject.FindGameObjectWithTag("right");
     lcolman = lside.GetComponent <collMan>();
     rcolman = rside.GetComponent <collMan>();
     dif     = 10;
 }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        element = GameObject.FindGameObjectsWithTag("element");
        //Debug.Log("There are " + element.Length + " elements on the map");
        player = GameObject.FindWithTag("Player");
        inv    = player.GetComponent <playerInv>();

        /* for (int i = 0; i < 3; i++)
         * {
         *   ab=inv.getElement(i);
         *   if (ab == true && i == 0)
         *   {
         *       Debug.Log("Player has Fire");
         *   }
         *   else if(ab==false && i==0)
         *       Debug.Log("Player doesn't have Fire");
         *   if (ab == true && i == 1)
         *   {
         *       Debug.Log("Player has Water");
         *   }
         *   else if (ab == false && i == 1)
         *       Debug.Log("Player doesn't have Water");
         *   if (ab == true && i == 2)
         *   {
         *       Debug.Log("Player has Electricity");
         *   }
         *   else if (ab == false && i == 2)
         *       Debug.Log("Player doesn't have Electricity");
         *   if (ab == true && i == 3)
         *   {
         *       Debug.Log("Player has Earth");
         *   }
         *   else if (ab == false && i == 3)
         *       Debug.Log("Player doesn't have Earth");
         * }*/
        count = element.Length;
    }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     mang   = player.GetComponent <elementMang>();
     inv    = player.GetComponent <playerInv>();
 }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     inv    = player.GetComponent <playerInv>();
     move   = player.GetComponent <movement>();
 }