blob: 44971b200c79b6fb869bc4d03fce20f808dedd33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com
using UnityEngine;
using System.Collections;
public class SwitchCameraDemo : MonoBehaviour {
public ProFlareBatch flareBatch;
public Camera camera1;
public Camera camera2;
public bool switchNow;
bool ping;
void Start () {
camera2.enabled = false;
}
void Update () {
if(switchNow){
switchNow = false;
if(!ping){
ping = true;
flareBatch.SwitchCamera(camera2);
camera2.enabled = true;
camera1.enabled = false;
}else{
ping = false;
flareBatch.SwitchCamera(camera1);
camera1.enabled = true;
camera2.enabled = false;
}
}
}
}
|