Exemplo n.º 1
0
        void ITriggerListener.onTriggerEnter(Collider other, Collider self)
        {
            TransitionCollider tc = (TransitionCollider)other;

            TransitionManager.changeScenes(tc.destination, tc.location);
            Debug.log("triggerEnter: {0}", other.entity.name);
        }
Exemplo n.º 2
0
    void Start()
    {
/*
 *      //make sure player is seeing ladders in correct world
 *      if (space)
 *      {
 *          GetComponent<MFPP.Modules.LadderModule>().LadderLayerMask.value = 262144; //only see ladders in real world
 *      }
 *      else { GetComponent<MFPP.Modules.LadderModule>().LadderLayerMask.value = 524288; //only see ladders in laser world
 *      }
 */

        //Debug.Log(Camera.main.fieldOfView);

        mutationSpawner = GetComponent <MutationSpawner>();
        audioSource     = GetComponent <AudioSource>();
        rm = GetComponent <RaycastManager>();
        SoundBox box = SoundBox.Instance;

        flipSounds         = box.currentFlipPalette;
        flipFailClip       = box.flipFail;
        soundTrack         = GetComponentInChildren <SoundTrackManager>();
        flipburst          = GetComponentInChildren <flipburst>();
        transitionCollider = GetComponentInChildren <TransitionCollider>();
        eyeThatSeesList    = new List <EyeThatSees>();
        _pickupModule      = GetComponent <MFPP.Modules.PickUpModule>();

        eyesEffect = Camera.main.GetComponent <ImageEffectEyes>();
    }
Exemplo n.º 3
0
 public static Entity attachTransitionColliders(List <TiledObjectGroup> objectLayers, Entity tiledEntity, string location)
 {
     foreach (TiledObjectGroup tog in objectLayers)
     {
         if (tog.name == "Transitions")
         {
             TiledObjectGroup transitionLayer = tog;
             foreach (TiledObject transition in transitionLayer.objects)
             {
                 string destination;
                 transition.properties.TryGetValue("transitionTo", out destination);
                 TransitionCollider tc = new TransitionCollider(transition.x, transition.y, tileWidth, destination, location);
                 tc.isTrigger = true;
                 tiledEntity.addCollider(tc);
             }
         }
         break;
     }
     return(tiledEntity);
 }