2.3.0 • Published 10 months ago

ccrn v2.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Cocos Creator Game Importer for React Native

A CLI tool to import Cocos Creator games into React Native app natively (not using webview)

Prerequisite

Install

npm install ccrn -g

Commands

ccrn init: init the engine & dependencies

ccrn run-ios: import the engine to your xcode workspace

ccrn run-android: import the engine to your Android project

ccrn run: run for both platform

Usages

At root folder of your React Native project, run ccrn run to import both Android and IOS project

Use CCRNModule in your ts file

import React from 'react';
import {View, Button} from 'react-native';
import CCRNModule from './ts/CCRNModule';

function App(): JSX.Element {
  return (
    <View>
      <Button
        onPress={() => {
          CCRNModule.startGame("happy-pop");
        }}
        title={'happy-pop-1'}
      />
      <Button
        onPress={() => {
          CCRNModule.startGame("space-shooter");
        }}
        title={'space-shooter'}
      />
    </View>
  );
}

export default App;
2.3.0

10 months ago

2.2.0

11 months ago

2.1.0

11 months ago

2.0.0

11 months ago

1.1.0

12 months ago

1.0.0

12 months ago