Ejemplo n.º 1
0
    public int natureOfOrb;//0 fire, 1 lightning, 2 nothing

    void OnEnable()
    {
        if (natureOfOrb == 0)
        {
            orbInside = Instantiate(OrbManagerScript.getProviderStationaryF(), transform.position + Vector3.up, Quaternion.identity);
            orbInside.transform.SetParent(gameObject.transform);
        }
        else if (natureOfOrb == 1)
        {
            orbInside = Instantiate(OrbManagerScript.getProviderStationaryL(), transform.position + Vector3.up, Quaternion.identity);
            orbInside.transform.SetParent(gameObject.transform);
        }
    }
Ejemplo n.º 2
0
 void Throw()
 {
     stationaryOrb.SendMessage("RemoveSelf");
     if (natureOfOrb == 0)
     {
         shotOrb = Instantiate(OrbManagerScript.getPlayerShotF(), orbPoint, Quaternion.identity);
     }
     else
     {
         shotOrb = Instantiate(OrbManagerScript.getPlayerShotL(), orbPoint, Quaternion.identity);
     }
     shotOrb.transform.forward = transform.forward;
     shotOrb.SendMessage("Fly");
     natureOfOrb = 10;
 }
Ejemplo n.º 3
0
 void Catch(int nature)
 {
     if (natureOfOrb == 10)
     {
         natureOfOrb = nature;
         if (natureOfOrb == 0)
         {
             stationaryOrb = Instantiate(OrbManagerScript.getPlayerHeldF(), orbPoint, Quaternion.identity);
         }
         else
         {
             stationaryOrb = Instantiate(OrbManagerScript.getPlayerHeldL(), orbPoint, Quaternion.identity);
         }
         stationaryOrb.transform.parent = transform.GetChild(0).transform;
     }
 }
Ejemplo n.º 4
0
    void Send()
    {
        switch (natureOfOrb)
        {
        case 0:
            sentOrb = Instantiate(OrbManagerScript.getProviderSentF(), transform.position + Vector3.up, Quaternion.identity);
            SetFree();  break;

        case 1:
            sentOrb = Instantiate(OrbManagerScript.getProviderSentL(), transform.position + Vector3.up, Quaternion.identity);
            SetFree(); break;

        default:
            break;
        }
    }
Ejemplo n.º 5
0
    void GetOrbed(int nature)
    {
        if (natureOfOrb == 10)
        {   //Send();
            natureOfOrb = nature;
            switch (natureOfOrb)
            {
            case 0:
                orbInside = Instantiate(OrbManagerScript.getProviderStationaryF(),
                                        transform.position + Vector3.up, Quaternion.identity); break;

            case 1:
                orbInside = Instantiate(OrbManagerScript.getProviderStationaryL(),
                                        transform.position + Vector3.up, Quaternion.identity); break;

            default:
                orbInside = Instantiate(OrbManagerScript.getProviderStationaryF(),
                                        transform.position + Vector3.up, Quaternion.identity); break;
            }
            orbInside.transform.SetParent(gameObject.transform);
        }
    }
Ejemplo n.º 6
0
 void Awake()
 {
     instance = this;
 }