-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathAppInit.js
169 lines (155 loc) · 4.34 KB
/
AppInit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableHighlight,
} from 'react-native';
import * as Animatable from 'react-native-animatable'
import LinearGradient from 'react-native-linear-gradient';
import VRPanorama from './VRPanorama';
import Center from './Center';
import Items from './Items';
import RNModel from './RNModel';
import testAction from './testAction';
import NicknamePage from './NicknamePage';
import tab from './tab';
import NavPet from './NavPet';
import gym_04 from './gym_04';
import Battle_PetBox from './Battle_PetBox';
import Battle_LandingPage from './Battle_LandingPage';
import NavMap from './NavMap';
import data from './src/data.json';
var AppInit = React.createClass({
onPress(){
// const { navigator } = this.props;
// if(navigator) {
// navigator.push({
// name: 'NicknamePage',
// component: NicknamePage,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'tab',
// component: tab,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'NavPet',
// component: NavPet,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'gym_04',
// component: gym_04,
// })
// }
const { navigator } = this.props;
if(navigator) {
navigator.replace({
name: 'NavMap',
component: NavMap,
})
}
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'VRPanorama',
// component: VRPanorama,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'Center',
// component: Center,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'Items',
// component: Items,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'RNModel',
// component: RNModel,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'Battle_PetBox',
// component: Battle_PetBox,
// })
// }
// const { navigator } = this.props;
// if(navigator) {
// navigator.replace({
// name: 'Battle_LandingPage',
// component: Battle_LandingPage,
// })
// }
},
render() {
return (
<View style={styles.container}>
<LinearGradient colors={['#EB8128','#E76128','#E34228']} style={{flex: 1,justifyContent: 'center',alignItems: 'center',}}>
<View style={styles.blank}></View>
<View style={styles.Logo}>
<Animatable.Image
animation="lightSpeedIn" iterationCount={1}
source={require('./Img/Icon.png')}
style={{width:180,height:180 }}>
</Animatable.Image>
</View>
<View style={styles.blank}></View>
<View style={styles.start}>
<Animatable.Text style={styles.welcome} delay={1000}
animation="tada" iterationCount="infinite"
onPress={this.onPress}>
{"START"}
</Animatable.Text>
</View>
<View style={styles.blank}>
<Text style={styles.welcome}>
{
//data.monster[0].name
}
</Text>
</View>
</LinearGradient>
</View>
);
}
});
var styles = StyleSheet.create({
blank:{
flex: 1,
},
start:{
flex: 2,
},
Logo:{
flex: 3,
},
welcome:{
fontSize: 30,
fontWeight: "bold",
color:'#FFFFFF'
},
container: {
flex: 1,
},
});
module.exports = AppInit;