ソースを参照

添加了一些测试

MoYuWang 10 ヶ月 前
コミット
b29f71f563

+ 4 - 0
Classes/AppDelegate.cpp

@@ -1,5 +1,6 @@
 #include "AppDelegate.h"
 
+#include "TestScene.h"
 
 USING_NS_CC;
 #include "common/BigFile.h"
@@ -99,6 +100,9 @@ bool AppDelegate::applicationDidFinishLaunching() {
 
     register_all_packages();
     
+    auto scene = TestScene::createScene();
+    
+    director->pushScene(scene);
     
 //    demo_StartGame();
     

+ 50 - 0
Classes/TestScene.cpp

@@ -0,0 +1,50 @@
+//
+//  TestScene.cpp
+//  demo
+//
+//  Created by Red_mini on 2024/10/11.
+//
+
+#include "TestScene.h"
+#include "RUReboltLayer.h"
+
+USING_NS_CC;
+
+Scene* TestScene::createScene(){
+    
+    // create the scene with physics enabled
+    auto scene = Scene::create();
+
+    auto layer = TestScene::create();
+    scene->addChild(layer);
+    
+    return scene;
+}
+
+bool TestScene::init(){
+    if (!Layer::init()) {
+        return false;
+    }
+
+    // 在此处添加场景初始化的代码,比如创建背景、角色、UI等
+    createBoard();
+    schedule(CC_SCHEDULE_SELECTOR(TestScene::update), 1.0f);
+    
+    return true;
+}
+
+void TestScene::createBoard(){
+
+    auto _layer = redutils::RUReboltLayer::createReboltLayer("shop_interface.redream");
+    this->addChild(_layer);
+//    _layer->registerOnNotify([this](const redutils::ReboltNotifyData& data){
+//
+//    });
+//    _layer->runBehaviacWhitFunName("初始化");
+    
+}
+
+void TestScene::update(float dt){
+    
+    
+}

+ 26 - 0
Classes/TestScene.h

@@ -0,0 +1,26 @@
+//
+//  TestScene.h
+//  demo
+//
+//  Created by Red_mini on 2024/10/11.
+//
+
+#ifndef TestScene_h
+#define TestScene_h
+
+#include "cocos2d.h"
+
+class TestScene : public cocos2d::Layer {
+public:
+    static cocos2d::Scene* createScene();
+    virtual bool init();
+    
+    CREATE_FUNC(TestScene);
+private:
+    void createBoard();
+    void update(float dt);
+    
+};
+
+
+#endif /* TestScene_h */

+ 1 - 0
Resources/res_ScrewGame

@@ -0,0 +1 @@
+Subproject commit 28bbfa834cda3f5743c1660309155b8b8d759f9b

+ 1 - 1
proj.ios_mac/copyRes.sh

@@ -1,7 +1,7 @@
 #https://blog.csdn.net/Register_man/article/details/53860064
 #http://www.cnblogs.com/end/archive/2012/02/21/2360965.html
 
-source ~/.bash_profile
+#source ~/.bash_profile
 source /etc/zprofile
 
 #! /bin/bash

+ 14 - 4
proj.ios_mac/demo.xcodeproj/project.pbxproj

@@ -49,10 +49,13 @@
 		5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78817EB974C00C73F5D /* AppKit.framework */; };
 		5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78A17EB975400C73F5D /* OpenGL.framework */; };
 		8262943E1AAF051F00CB7CF7 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8262943D1AAF051F00CB7CF7 /* Security.framework */; };
-		A5CD491F2C932BD40023FF6C /* res_ScrewGame in Resources */ = {isa = PBXBuildFile; fileRef = A5CD491D2C932BD40023FF6C /* res_ScrewGame */; };
 		A5CD49202C932BD40023FF6C /* scripts in Resources */ = {isa = PBXBuildFile; fileRef = A5CD491E2C932BD40023FF6C /* scripts */; };
 		BF0045D6B142DBAA2FDD68D6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9E14807A8C8CC4A87B4DCD8 /* WebKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; };
+		C17ACCBC2CB903BA0072A711 /* TestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17ACCBB2CB903BA0072A711 /* TestScene.cpp */; };
+		C17ACCBD2CB903BA0072A711 /* TestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17ACCBB2CB903BA0072A711 /* TestScene.cpp */; };
+		C17ACCC82CB90FF80072A711 /* res_ScrewGame in Resources */ = {isa = PBXBuildFile; fileRef = C17ACCC72CB90FF80072A711 /* res_ScrewGame */; };
+		C17ACCC92CB90FF80072A711 /* res_ScrewGame in Resources */ = {isa = PBXBuildFile; fileRef = C17ACCC72CB90FF80072A711 /* res_ScrewGame */; };
 		D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; };
 		D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; };
 		D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; };
@@ -189,9 +192,11 @@
 		5087E78817EB974C00C73F5D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
 		5087E78A17EB975400C73F5D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
 		8262943D1AAF051F00CB7CF7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
-		A5CD491D2C932BD40023FF6C /* res_ScrewGame */ = {isa = PBXFileReference; lastKnownFileType = folder; path = res_ScrewGame; sourceTree = "<group>"; };
 		A5CD491E2C932BD40023FF6C /* scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = scripts; sourceTree = "<group>"; };
 		BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		C17ACCBB2CB903BA0072A711 /* TestScene.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestScene.cpp; sourceTree = "<group>"; };
+		C17ACCC52CB904460072A711 /* TestScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestScene.h; sourceTree = "<group>"; };
+		C17ACCC72CB90FF80072A711 /* res_ScrewGame */ = {isa = PBXFileReference; lastKnownFileType = folder; path = res_ScrewGame; sourceTree = "<group>"; };
 		D44C620B132DFF330009C878 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
 		D44C620D132DFF430009C878 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
 		D44C620F132DFF4E0009C878 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
@@ -429,7 +434,7 @@
 		46880B7519C43A67006E1F66 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
-				A5CD491D2C932BD40023FF6C /* res_ScrewGame */,
+				C17ACCC72CB90FF80072A711 /* res_ScrewGame */,
 				A5CD491E2C932BD40023FF6C /* scripts */,
 				E242B7B22590E28E009BE07D /* Images.xcassets */,
 				18BC680F2106EAB400288C27 /* Images.xcassets */,
@@ -444,6 +449,8 @@
 				2F15C5DC2CB8F65A0057855D /* IAP */,
 				46880B8419C43A87006E1F66 /* AppDelegate.cpp */,
 				46880B8519C43A87006E1F66 /* AppDelegate.h */,
+				C17ACCBB2CB903BA0072A711 /* TestScene.cpp */,
+				C17ACCC52CB904460072A711 /* TestScene.h */,
 			);
 			name = Classes;
 			path = ../Classes;
@@ -659,6 +666,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				C17ACCC82CB90FF80072A711 /* res_ScrewGame in Resources */,
 				18BC68102106EAB400288C27 /* Images.xcassets in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -667,7 +675,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				A5CD491F2C932BD40023FF6C /* res_ScrewGame in Resources */,
+				C17ACCC92CB90FF80072A711 /* res_ScrewGame in Resources */,
 				23F924B52ADCE4A500563AFD /* Icon.icns in Resources */,
 				A5CD49202C932BD40023FF6C /* scripts in Resources */,
 				23F924B42ADCE49D00563AFD /* Images.xcassets in Resources */,
@@ -720,6 +728,7 @@
 				2F15E2402CB52B0F00082BF8 /* IAPProductInfo.cpp in Sources */,
 				E4D223482BD667E8006F1F8D /* AdUtils.cpp in Sources */,
 				E4E7A1222BD75C3F00107AED /* RPRedAudio.cpp in Sources */,
+				C17ACCBC2CB903BA0072A711 /* TestScene.cpp in Sources */,
 				E4D223402BD667D4006F1F8D /* AdUtilsInterstitial.cpp in Sources */,
 				E4D2234F2BD66CDE006F1F8D /* RedWise.cpp in Sources */,
 			);
@@ -745,6 +754,7 @@
 				184505681E2E5BD700EF4807 /* main.cpp in Sources */,
 				2F15E2432CB52B0F00082BF8 /* IAPUtils.cpp in Sources */,
 				2F15C5F82CB8F65A0057855D /* IAPUserData.cpp in Sources */,
+				C17ACCBD2CB903BA0072A711 /* TestScene.cpp in Sources */,
 				2F15C5F52CB8F65A0057855D /* IAPCtlArea23.cpp in Sources */,
 				E4E7A1232BD75C3F00107AED /* RPRedAudio.cpp in Sources */,
 			);