FadeIn() public method

public FadeIn ( float newFadeTime ) : void
newFadeTime float
return void
Exemplo n.º 1
0
        void CheckToOpenDoor()
        {
            if ((variableStorage.GetValue("$open_door").AsBool == true) && (thisCharacter == Characters.MartinDoor))
            {
                gameObject.SetActive(false);
                roomShade.FadeOut();
            }
            else if ((variableStorage.GetValue("$open_door").AsBool == false) && (thisCharacter == Characters.MartinDoor))
            {
                roomShade.FadeIn();
            }

            if ((variableStorage.GetValue("$open_door").AsBool == true) && (thisCharacter == Characters.WilliamsDoor))
            {
                print("Door Disabled Williams");
                roomShade.FadeOut();
                gameObject.GetComponent <SpriteRenderer>().enabled = false;
                gameObject.GetComponent <BoxCollider2D>().enabled  = false;
                //talkToNode = null;
                gameObject.transform.GetChild(0).gameObject.SetActive(false);
            }
            if ((variableStorage.GetValue("$open_door").AsBool == false) && (thisCharacter == Characters.WilliamsDoor))
            {
                gameObject.GetComponent <SpriteRenderer>().enabled = true;
                gameObject.GetComponent <BoxCollider2D>().enabled  = true;
                roomShade.FadeIn();
            }
        }
Exemplo n.º 2
0
 public void fadeGraceJosephIn()
 {
     fade = gameObject.GetComponent<FadeObjectInOut> ();
     megaCache = gameObject.GetComponent<MegaCacheOBJ> ();
     fade.FadeIn ();
     megaCache.animate = true;
 }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (Camera.main == null)
        {
            return;
        }

        float distToCam = (transform.position - Camera.main.transform.position).magnitude;

        if (distToCam < threshhold)
        {
            if (fader != null && !faded)
            {
                fader.FadeOut();
            }
            faded = true;
        }
        else
        {
            if (faded)
            {
                fader.FadeIn();
                faded = false;
            }
        }
    }
Exemplo n.º 4
0
 void OnTriggerExit(Collider other)
 {
     if (other.GetComponent <PlayerCharacterController>() != null && --heroCount == 0)
     {
         fade.FadeIn();
     }
 }
Exemplo n.º 5
0
 public void fadeGhostsIn()
 {
     fade = gameObject.GetComponent<FadeObjectInOut> ();
     megaCache = gameObject.GetComponent<MegaCacheOBJ> ();
     megaCache.animate = true;
     fade.fadeTime = 0.5f;
     fade.FadeIn ();
 }
Exemplo n.º 6
0
    public void StateChange(bool currentState)
    {
        if (currentState != dayTime)
        {
            if (dayTime == true)
            {
                if (flower_elevator != null)
                {
                    foreach (GameObject flower in flower_elevator)
                    {
                        if (flower.GetComponent <ChangeToDay>() != null)
                        {
                            Destroy(flower.GetComponent <ChangeToDay>());
                        }
                        if (flower.GetComponent <ChangeToNight>() == null)
                        {
                            flower.AddComponent <ChangeToNight>();
                        }
                    }
                }

                //flower.Change();
                dayTime = false;
                fday.FadeOut(0.8f);
                night.SetActive(true);
                cameraNight.SetActive(true);
                SetAllCollidersStatus(day, false);
                dayBGM.Stop();
                nightBGM.Play();
            }
            else
            {
                foreach (GameObject flower in flower_elevator)
                {
                    if (flower.GetComponent <ChangeToNight>() != null)
                    {
                        Destroy(flower.GetComponent <ChangeToNight>());
                    }
                    if (flower.GetComponent <ChangeToDay>() == null)
                    {
                        flower.AddComponent <ChangeToDay>();
                    }
                }

                //System.Threading.Thread.Sleep(2000);

                //flower.Change();
                dayTime = true;
                fday.FadeIn(0.6f);
                night.SetActive(false);
                cameraNight.SetActive(false);
                SetAllCollidersStatus(day, true);
                dayBGM.Play();
                nightBGM.Stop();
            }
        }
    }
Exemplo n.º 7
0
    //FlowerGrowShrink flower;

    //public GameObject[] nightObjects = GameObject.FindGameObjectsWithTag("Night");
    //public GameObject[] dayObjects = GameObject.FindGameObjectsWithTag("Day");

    private void Start()
    {
        fday   = day.AddComponent <FadeObjectInOut>();
        fnight = day.AddComponent <FadeObjectInOut>();
        fday.FadeIn();
        dayBGM.Play();
        nightBGM.Stop();
        //flower = new FlowerGrowShrink();
    }
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     //Renderer r = this.gameObject.GetComponent<Renderer> ();
     //r.material.SetColor ("_Color", new Color (0, 0, 0, 0));
     fader = this.gameObject.GetComponent <FadeObjectInOut> ();
     fader.logInitialFadeSequence = true;
     fader.FadeIn();
     StartCoroutine(FadeOut());
 }
Exemplo n.º 9
0
    public void DisplayTooltip()
    {
        PlayHighlightSound();

        tooltipText.text = tooltipMessage;

        if (tooltipFader.visible == false)
        {
            tooltipFader.FadeIn(1f);
        }
    }
    public void activateMarkers(int i)
    {
        GameObject marker = GameObject.FindGameObjectWithTag ("lp" + i);

        amis = marker.GetComponents<AdjacentMarkerIdentifier> ();
        foreach (AdjacentMarkerIdentifier ami in amis) {
            GameObject newMarker = GameObject.FindGameObjectWithTag("lp"+ami.markerToActivate);

            fade = newMarker.GetComponent<FadeObjectInOut> ();
            fade.FadeIn ();

            coll = newMarker.GetComponent<MeshCollider> ();
            coll.enabled = true;
        }
    }
 // Use this for initialization
 void Start()
 {
     //find all location markers
     locationMarkers = GameObject.Find ("LocationMarkers");
     locationPoints=locationMarkers.GetComponentsInChildren<Transform> ();
     //For each location marker disable the renderer and collider
     for (int i=0; i<locationPoints.Length; i++) {
         if (locationPoints[i].gameObject.name!="LocationMarkers"){//Don't add these to the parent
             locationPoints[i].gameObject.AddComponent<FadeObjectInOut>();
             fade = locationPoints[i].gameObject.GetComponent<FadeObjectInOut>();
             fade.FadeOut(0.01f);
             coll = locationPoints[i].gameObject.GetComponent<MeshCollider>();
             coll.enabled=false;
             locationPoints[i].gameObject.tag="lp"+i;
         }
     }
     GameObject firstMarker = GameObject.FindGameObjectWithTag ("lp1");
     fade = firstMarker.GetComponent<FadeObjectInOut> ();
     fade.FadeIn ();
     coll = firstMarker.GetComponent<MeshCollider> ();
     coll.enabled = true;
 }