private void OnKeyPress(KeyCode kc) { Engine.Node camNode = m_Camera.GetNode(); Vector3 pos = camNode.GetLocalPosition(); //KeyCode kc = (KeyCode)param1; switch (kc) { case KeyCode.UpArrow: { pos.y += 1; camNode.SetLocalPosition(pos); break; } case KeyCode.DownArrow: { pos.y -= 1; camNode.SetLocalPosition(pos); break; } case KeyCode.LeftArrow: { pos.x -= 1; camNode.SetLocalPosition(pos); break; } case KeyCode.RightArrow: { pos.x += 1; camNode.SetLocalPosition(pos); break; } } }
private void UpdateEffectWidget() { if (null != m_effect) { Engine.Node node = m_effect.GetNode(); if (node != null) { Transform trans = node.GetTransForm(); if (trans != null) { trans.parent = cachedTransform; node.SetLocalPosition(Vector3.zero); trans.localScale = Vector3.one; trans.SetChildLayer(LayerMask.NameToLayer("UI")); } } } }