예제 #1
0
        private static void entryMarker(Transform parent, TrickData td, Dictionary <string, GameObject> dic, GameObject baseObj)
        {
            if (!td.IsVisualized())
            {
                return;
            }
            GameObject gameObject1 = baseObj;
            string     markerName  = td.mTrickParam.MarkerName;

            if (!string.IsNullOrEmpty(markerName) && dic.ContainsKey(markerName))
            {
                gameObject1 = dic[markerName];
            }
            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)gameObject1))
            {
                return;
            }
            Vector3 vector3;

            // ISSUE: explicit reference operation
            ((Vector3)@vector3).\u002Ector((float)(int)td.mGridX + 0.5f, GameUtility.CalcHeight((float)(int)td.mGridX + 0.5f, (float)(int)td.mGridY + 0.5f), (float)(int)td.mGridY + 0.5f);
            GameObject gameObject2 = UnityEngine.Object.Instantiate((UnityEngine.Object)gameObject1, vector3, Quaternion.get_identity()) as GameObject;

            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)gameObject2))
            {
                return;
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)parent, (UnityEngine.Object)null))
            {
                gameObject2.get_transform().SetParent(parent, false);
            }
            TrickData.mTrickMarkerLists.Add(td, gameObject2);
        }
예제 #2
0
        private void UpdateCameraPosition()
        {
            GameSettings instance = GameSettings.Instance;

            this.m_CameraPos.y  = (__Null)(double)GameUtility.CalcHeight((float)this.m_CameraPos.x, (float)this.m_CameraPos.z);
            this.m_Camera.Pitch = (float)this.m_CameraRot.x;
            this.m_Camera.Yaw   = (float)this.m_CameraRot.y;
            this.m_Camera.SetPositionYaw(Vector3.op_Addition(this.m_CameraPos, Vector3.op_Multiply(Vector3.get_up(), instance.GameCamera_UnitHeightOffset)), this.m_CamAngle);
        }