本文整理汇总了C#中CameraManager类的典型用法代码示例。如果您正苦于以下问题:C# CameraManager类的具体用法?C# CameraManager怎么用?C# CameraManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CameraManager类属于命名空间,在下文中一共展示了CameraManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WaitingState
public WaitingState(StateMachine sm, CameraManager cam, Game game, float time, Team TeamOnSuper)
: base(sm, cam, game)
{
this.remainingTime = time;
this.TeamOnSuper = TeamOnSuper;
this.onWiningPoints = false;
}
示例2: gvwCamera_RowDeleting
protected void gvwCamera_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string id = gvwCamera.DataKeys[e.RowIndex].Value.ToString();
CameraManager cm = new CameraManager();
cm.DeleteCamera(id, Session["userid"].ToString());
Query();
}
示例3: Awake
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Awake()
{
cameraManager = GameObject.Find("_CameraTarget").GetComponent<CameraManager>();
m_groc.gameObject.SetActive(false);
m_verd.gameObject.SetActive(false);
}
示例4: Start
private void Start()
{
if (!string.IsNullOrEmpty(this.PoseStd) && base.gameObject.animation)
{
base.gameObject.animation.CrossFade(this.PoseStd);
}
this.cameraMgr = Tools.GetSafeComponent<CameraManager>(base.gameObject);
this.navAgent = Tools.GetSafeComponent<NavMeshAgent>(base.gameObject);
this.navAgent.radius = 0.2f;
this.navAgent.speed = 2.8f;
this.navAgent.acceleration = 40960f;
this.navAgent.autoRepath = false;
this.navAgent.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;
this.navAgent.updateRotation = false;
GameObject gameObject = Res.Load<GameObject>("Skill/st_002", false);
if (gameObject != null)
{
this.attackArea = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
if (this.attackArea != null)
{
this.attackArea.transform.parent = base.transform;
this.attackArea.transform.localPosition = Vector3.zero;
this.attackArea.transform.localRotation = Quaternion.identity;
this.attackArea.transform.localScale = Vector3.one;
this.attackArea.layer = base.gameObject.layer;
}
}
}
示例5: Awake
// Use this for references
void Awake() {
cameraManager = GameObject.FindGameObjectWithTag("CameraManager").GetComponent<CameraManager>();
rigBody = GetComponent<Rigidbody>();
Collider[] colliders = GetComponents<Collider>();
standingColl = colliders[0];
crouchingColl = colliders[1];
}
示例6: OnCameraChange
private void OnCameraChange(CameraManager.CameraMode cameraMode)
{
if (cameraMode == CameraManager.CameraMode.IVA) {
isActive = true;
activatedAt = DateTime.Now;
} else
isActive = false;
}
示例7: StartStep
public override void StartStep()
{
FindObjectOfType<GameUIManager>().gameObject.SetActive(false);
mainCamera = Camera.main;
cameraManager = mainCamera.gameObject.GetComponent<CameraManager>();
cameraManager.enabled = false;
mainCamera.DOShakePosition(duration, strenght, vibrato).OnComplete(OnShakeComplete);
}
示例8: StartStep
public override void StartStep()
{
mainCamera = Camera.main;
cameraManager = mainCamera.gameObject.GetComponent<CameraManager>();
cameraManager.enabled = false;
mainCamera.gameObject.transform.DOMoveY(toMove, duration).SetEase(ease);
EndStep();
}
示例9: Awake
private void Awake()
{
camManager = Camera.mainCamera.GetComponent<CameraManager>();
cController = GetComponent<CharacterController>();
animator = GetComponent<Animator>();
camManager.player = this;
}
示例10: StartScene
public override void StartScene (System.Action endCallback, CameraManager cameraManager)
{
base.StartScene (endCallback, cameraManager);
Character character = Menu.Instance.GetCharacterByType(CharacterType.Ataraxia);
character.PositionTo (initPositionCharacter.position);
Invoke (Helpers.NameOf(StartDialog),timeToStartMessage);
}
示例11: Awake
protected virtual void Awake()
{
playerManager = GameObject.FindWithTag("Player").GetComponent<PlayerManager>();
cam = GameObject.Find("Camera");
cameraManager = GameObject.Find("Camera").GetComponent<CameraManager>();
playerCanvasManager = GameObject.Find("PlayerCanvas").GetComponent<PlayerCanvasManager>();
StartCoroutine(StartMovie());
}
示例12: Awake
void Awake()
{
playerCamera = GameObject.Find("Player Camera").GetComponent<Camera>();
minimapCamera = GameObject.Find("Minimap Camera").GetComponent<Camera>();
currPlayer = playerCamera.transform.parent.gameObject.GetComponent<Player>();
world = GameObject.Find("World");
cameraMgr = GameObject.FindObjectOfType<CameraManager>();
}
示例13: ConnectionManager
public ConnectionManager(WebcamServer s)
{
server = s;
camManager = new CameraManager();
clients = new List<string>();
udpSender = new UdpClient();
udpListener = new UdpClient(1112);
udpListener.BeginReceive(new AsyncCallback(OnReceive), udpListener);
}
示例14: Awake
// Use this for initialization
void Awake()
{
cm = GetComponentInParent<CameraManager>();
if (activator1 != null)
{
//store activator gameObject in a temporary variable for when null we can retrieve later
GameObject temp = activator1;
// Checks for a trigger collider; If the game object in the activator slot
// is not trigger, but has a child that is a trigger, the child becomes the activator
if (activator1.transform.childCount > 0)
{
Collider[] _activator1 = activator1.gameObject.GetComponentsInChildren<Collider>();
activator1 = null;
foreach (Collider c in _activator1)
{
if (c.isTrigger == true)
activator1 = c.gameObject;
}
if (activator1 == null)
activator1 = temp;
}
}
//do the same thing if a second activator exists
if (activator2 != null)
{
GameObject temp = activator2;
if (activator2.transform.childCount > 0)
{
Collider[] _activator2 = activator2.gameObject.GetComponentsInChildren<Collider>();
activator2 = null;
foreach (Collider c in _activator2)
{
if (c.isTrigger == true)
activator2 = c.gameObject;
}
if (activator2 == null)
activator2 = temp;
}
}
//listening for "checkpoint" to swap cameras
Messenger.AddListener<GameObject,Transform>(listeningForSetCam, SetCam);
//listening for "playerdied" to switch the follow targets to the alive player
Messenger.AddListener<string>(listeningForReTarget, SetTarget);
Messenger.MarkAsPermanent(listeningForSetCam);
Messenger.MarkAsPermanent(listeningForReTarget);
if (!startCam)
gameObject.SetActive(false);
}
示例15: Start
void Start()
{
turnsCompleted = 0;
gameManager = this;
currentPlayers = new LinkedList<Entity>();
currentTurn = JANITOR;
cameraManager = GetComponent<CameraManager>();
uiManager = GameObject.FindObjectOfType<UIManager>();
turnsLeft = turnsPerPlayer;
}