Ejemplo n.º 1
0
    public void Start()
    {
        float tempX = x;
        float tempY = y;

        upperFaceRect = new Rect(tempX, tempY, upperFaceTex.width, upperFaceTex.height);

        tempY += upperFaceTex.height;

        if (eye == null)
        {
            eye = new Eye(tempX, tempY, eyeNeutralTex, blinkTex, winkLeftTex, winkRightTex, lookLeftTex, lookRightTex);
        }

        if (upperFace == null)
        {
            upperFace = new UpperFace(tempX, tempY, eyeNeutralTex, raiseBrowTex);
        }

        tempY += eyeNeutralTex.height;

        midFaceRect = new Rect(tempX, tempY, midFaceTex.width, midFaceTex.height);

        tempY += midFaceRect.height;

        if (lowerFace == null)
        {
            lowerFace = new LowerFace(tempX, tempY, lowerFaceNeutralTex, smileTex, clenchTex, smirkLeftTex, smirkRightTex, laughTex);
        }
    }
Ejemplo n.º 2
0
 public bool Equals(Cube cube)
 {
     return(
         LeftFace.Equals(cube.LeftFace) &&
         RightFace.Equals(cube.RightFace) &&
         FrontFace.Equals(cube.FrontFace) &&
         RearFace.Equals(cube.RearFace) &&
         UpperFace.Equals(cube.UpperFace) &&
         BottomFace.Equals(cube.BottomFace)
         );
 }
Ejemplo n.º 3
0
 public Cube Copy()
 {
     return(new Cube
     {
         LeftFace = LeftFace.Copy(),
         RightFace = RightFace.Copy(),
         FrontFace = FrontFace.Copy(),
         RearFace = RearFace.Copy(),
         UpperFace = UpperFace.Copy(),
         BottomFace = BottomFace.Copy()
     });
 }