Ejemplo n.º 1
0
        }                                               ///@property(readwrite,assign) float height;

        public void AddToScene(CraterInfo info)
        {
            position = info.position;
            type     = info.type;
            if ((int)type == (int)CraterType.e_Normal)
            {
                bumpRadius = 160.0f;
                height     = 65.0f;
            }
            else if ((int)type == (int)CraterType.e_Normal2x2)
            {
                bumpRadius = 64.0f;
                height     = 25.0f;
            }
            else if ((int)type == (int)CraterType.e_Normal1x1)
            {
                bumpRadius = 32.0f;
                height     = 13.0f;
            }
            else if ((int)type == (int)CraterType.e_Hillock)
            {
                bumpRadius = 128.0f;
                height     = 48.0f;
            }
            else if ((int)type == (int)CraterType.e_SmallBump)
            {
                bumpRadius = 64.0f;
                height     = 13.0f;
            }
            else
            {
                Globals.Assert(false);
            }

            bumpRadiusSqr = (bumpRadius * bumpRadius);
        }
Ejemplo n.º 2
0
        }                                                                     ///@property(readwrite,assign) CGPoint position;

        public void SetType(CraterType inThing)
        {
            type = inThing;
        }                                                ///@property(readwrite,assign) CraterType type;