public void AddToSceneP1(HangingButton.HangingButtonInfo info, FrontEndButton inButt) { hangingButtonScale = info.hangingButtonScale; if (hangingButtonScale <= 0.0f) { hangingButtonScale = 1.0f; } wobbleDeclineMultiplier = 1.0f; yOffset = 0.0f; myButton = inButt; showWobbleMultiplier = info.showWobbleMultiplier; longerRope = 0.0f; baseAngleFromCentre = Utilities.GetAngleFromXYP1(info.offset.x, info.offset.y); baseAngleFromCentre2 = Utilities.GetAngleFromXYP1(-info.offset.x, info.offset.y); baseDistance = Utilities.GetDistanceP1(Utilities.CGPointMake(0, 0), info.offset); currentOffset = info.offset; currentOffset2 = info.offset; currentOffset2.x = -currentOffset2.x; type = info.type; currentWobble = 0.0f; if ((int)type == (int)HangingButtonType.kHB_Rope) { } else { } subTextureId = info.subTextureId; }
} ///@property(readwrite,assign) bool usingStrings; //public void SetActionDone(bool inThing) {actionDone = inThing;}///@property(readwrite,assign) bool actionDone; public FrontEndQuery() { //if (!base.init()) return null; unityText = null; textTexture = null; for (int i = 0; i < (int)QueryButton.kNumButtonsOnQuery; i++) { button[i] = new FrontEndButton(i); } for (int i = 0; i < (int)Enum.kMaxFunnyWordsInQuery; i++) { funnyWord[i] = null; } for (int i = 0; i < (int)Enum.kMaxCentralButtonsInQuery; i++) { buttonText[i] = null; } dimZob = new Zobject(); backdrop = new Zobject(); text = new Zobject(); chosenButton = (QueryButton)(-1); noDimZob = false; wordScale = 0.42f; wordGap = 32.0f; wordOffset = 0.0f; myColour = Constants.kColourLightGreen; usingStrings = false; //return this; }
} ///@property(readwrite,assign) FrontEndActions actionId; public FrontEndSwitch() { //if (!base.init()) return null; for (int i = 0; i < (int)SwitchState.tates; i++) { button[i] = new FrontEndButton(i); } soundId = 0; active = true; }
} ///@property(readwrite,assign) float baseAngleOffset; public HangingButton() { //if (!base.init()) return null; myButton = null; baseAngleOffset = 0.0f; //return this; for (int i = 0; i < 6; i++) { myBillboard[i] = null; } }
public int AddButtonP1(FrontEnd.ButtonInfo buttonInfo, float inWait) { Globals.Assert(numButtons < (int)Enum.kMaxNumButtons); if (button[numButtons] == null) { button[numButtons] = new FrontEndButton(numButtons); } (button[numButtons]).Initialise(buttonInfo); ((button[numButtons]).zobject).SetWaitToShow(inWait); numButtons++; return(numButtons - 1); }
} ////@property(readwrite,assign) FrontEndButton* doneButton; public SpeedBoostScreen() { //if (!base.init()) return null; speedObject = new Zobject(); sheepPic = new Zobject(); infoBubbleBackground = new Zobject(); for (int i = 0; i < (int)Enum.kNumCommentLines; i++) { commentLine[i] = new FunnyWord(); } doneButton = new FrontEndButton(0); //return this; }
public void Dealloc() { for (int i = 0; i < 6; i++) { if (myBillboard[i] != null) { myBillboard[i].Dealloc(); myBillboard[i] = null; } } if (myButton != null) { // myButton.Dealloc(); myButton = null; } }
} ////@property(readwrite,assign) ZAtlas* myAtlas; public Zscore() { // //if (!base.init()) return null; myAtlas = null; orientationButton = null; positionButton = null; for (int i = 0; i < (int)Enum.kMaxNumScoreDigits; i++) { zobject[i] = new Zobject(); } rotationWholeWord = 0.0f; scale = 1; state = ZscoreState.e_Hidden; prevScore = -1; decimalPoint = -1; digitWidth = 31; defaultColour = Constants.kColourWhite; dontDisplayLeadingZeros = false; xDigit[0] = 10.5f; xDigit[1] = 6.5f; xDigit[2] = 10.0f; xDigit[3] = 10.0f; xDigit[4] = 10.0f; xDigit[5] = 10.0f; xDigit[6] = 10.0f; xDigit[7] = 8.5f; xDigit[8] = 10.0f; xDigit[9] = 10.0f; xDigit[10] = 6.0f; timeBetweenShowingDigits = 0.05f; for (int i = 0; i < 11; i++) { xDigit[i] *= 3.0f; } // //return this; }
public void SetPositionButton(FrontEndButton inThing) { positionButton = inThing; } ////@property(readwrite,assign) FrontEndButton* positionButton;
} ///@property(readwrite,assign) float currentRotation; //public void SetYOffset(float inThing) {yOffset = inThing;}///@property(readwrite,assign) float yOffset; //public void SetButtonLabel(FunnyWord inThing) {buttonLabel = inThing;}////@property(readwrite,assign) FunnyWord* buttonLabel; //public void SetLongerRope(float inThing) {longerRope = inThing;}///@property(readwrite,assign) float longerRope; public void SetMyButton(FrontEndButton inThing) { myButton = inThing; } ////@property(readwrite,assign) FrontEndButton* myButton;
public void Render(FrontEndButton inButton, ZAtlas inAtlas) { if ((myButton.zobject).state == ZobjectState.kZobjectWaitingToShow) { return; } CGPoint renderPosition = (inButton.zobject).screenPosition; renderPosition.x += currentOffset.x; renderPosition.y += currentOffset.y; renderPosition.y += yOffset; renderPosition.y -= 35.0f; if (Globals.deviceIPad) { renderPosition.x += 32.0f; } if (myBillboard[0] == null) { myBillboard[0] = new Billboard("hangingButton1"); myBillboard[0].SetAtlas(inAtlas); myBillboard[0].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[0].myObject.layer = LayerMask.NameToLayer("guistuff"); } (DrawManager.Instance()).AddTextureToListP1(myBillboard[0], renderPosition, subTextureId, 1.0f); if (longerRope > 0.0f) { if (myBillboard[1] == null) { myBillboard[1] = new Billboard("hangingButton2"); myBillboard[1].SetAtlas(inAtlas); myBillboard[1].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[1].myObject.layer = LayerMask.NameToLayer("guistuff"); } renderPosition.y -= 65.0f; (DrawManager.Instance()).AddTextureToListP1(myBillboard[1], renderPosition, subTextureId, 1.0f); if (longerRope > 2.0f) { if (myBillboard[2] == null) { myBillboard[2] = new Billboard("hangingButton3"); myBillboard[2].SetAtlas(inAtlas); myBillboard[2].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[2].myObject.layer = LayerMask.NameToLayer("guistuff"); } renderPosition.y -= 65.0f; (DrawManager.Instance()).AddTextureToListP1(myBillboard[2], renderPosition, subTextureId, 1.0f); renderPosition.y += 65.0f; } renderPosition.y += 65.0f; } renderPosition = (inButton.zobject).screenPosition; renderPosition.x += currentOffset2.x; renderPosition.y += currentOffset2.y; renderPosition.y += yOffset; renderPosition.y -= 35.0f; if (Globals.deviceIPad) { renderPosition.x += 32.0f; } if (myBillboard[4] == null) { myBillboard[4] = new Billboard("hangingButton4"); myBillboard[4].SetAtlas(inAtlas); myBillboard[4].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[4].myObject.layer = LayerMask.NameToLayer("guistuff"); } (DrawManager.Instance()).AddTextureToListP1(myBillboard[4], renderPosition, subTextureId, hangingButtonScale); if (longerRope > 0.0f) { renderPosition.y -= 65.0f; // (DrawManager.Instance()).AddTextureToListP1(myBillboard[1],renderPosition, subTextureId); if (longerRope > 2.0f) { renderPosition.y -= 65.0f; // (DrawManager.Instance()).AddTextureToListP1(myBillboard[2],renderPosition, subTextureId); renderPosition.y += 65.0f; } renderPosition.y += 65.0f; } }
public void SetDoneButton(FrontEndButton inThing) { doneButton = inThing; } ////@property(readwrite,assign) FrontEndButton* doneButton;