Ejemplo n.º 1
0
 private void Start()
 {
     if (loadLastCheckpoint == null)
     {
         loadLastCheckpoint = new Trigger();
     }
     loadLastCheckpoint.AddTriggerListener(OnLoadLastCheckpoint);
 }
Ejemplo n.º 2
0
 private void OnEnable()
 {
     if (enterRoom == null)
     {
         enterRoom = new Trigger();
     }
     enterRoom.AddTriggerListener(OnEnterRoom);
 }
Ejemplo n.º 3
0
    private void OnEnable()
    {
        if (AttachedRigidbody.simulated == false)
        {
            enabled = false;
        }

        run.AddTriggerListener(Run);
        stop.AddTriggerListener(Stop);
        running.AddValueListener <bool>(OnSetRunning);
    }
Ejemplo n.º 4
0
    private void OnHide(bool hide)
    {
        if (hide)
        {
            stopHiding.AddTriggerListener(OnStopHiding, false);
        }
        else
        {
            stopHiding.RemoveTriggerListener(OnStopHiding);
        }

        if (AttachedBody != null)
        {
            AttachedBody.Visible = !hide;

            if (AttachedBody is PhysicalBody)
            {
                PhysicalBody physical = AttachedBody as PhysicalBody;
                physical.Simulate = !hide;
                physical.Move     = !hide;
            }
        }
    }
Ejemplo n.º 5
0
 protected override void Start()
 {
     base.Start();
     eject.AddTriggerListener(Eject);
 }
 private void OnEnable()
 {
     play.AddTriggerListener(OnPlay);
     stop.AddTriggerListener(OnStop);
     playing.AddValueListener <bool>(OnSetPlaying);
 }
Ejemplo n.º 7
0
 private void OnEnable()
 {
     tryJump.AddTriggerListener(OnTryJump);
     jump.AddTriggerListener(OnJump);
 }
Ejemplo n.º 8
0
 private void OnEnable()
 {
     play.AddTriggerListener(OnPlay);
 }
Ejemplo n.º 9
0
 private void OnEnable()
 {
     spawnUnit.AddTriggerListener(OnSpawnUnit);
     currentSpawnCoroutine = StartCoroutine(SpawnCoroutine());
 }
Ejemplo n.º 10
0
 private void OnEnable()
 {
     isHidingABody.AddValueListener <bool>(OnHiding);
     pushOut.AddTriggerListener(OnPushOut);
 }
Ejemplo n.º 11
0
 private void OnEnable()
 {
     grabTarget.AddTriggerListener(OnGrabTarget);
 }