Commit 3c9f90c7 authored by haiyoucuv's avatar haiyoucuv

1

parent d8868ba1
No preview for this file type
No preview for this file type
......@@ -27,7 +27,7 @@
<body>
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main"
data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="750"
data-content-height="1624" data-multi-fingered="2" data-show-fps="true" data-show-log="false"
data-content-height="1624" data-multi-fingered="2" data-show-fps="false" data-show-log="false"
data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
</div>
<img id="shareImg" />
......@@ -51,49 +51,11 @@
<!-- console.log('Hello world');-->
<!--</script>-->
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="//statics-web.iqiyi.com/common/jssdk/iqiyiJsBridge-v2-min.js"></script>
<script>
window['debug'] = true; // 是否是debug模式 是否打印debugLog
</script>
<script>
window['hbRainTime'] = 1;
window['hbTips'] = 88.8;
function iqiyiShare() {
return new Promise((resolve, reject) => {
resolve({kShareChannel:111});
iqiyi && iqiyi.share({
title: '尖叫之夜门票、现金红包限时抢,手慢无!',//标题
desc: '立即参与',//描述
link: 'http://activity.m.duibatest.com.cn/hdtool/index?id=23282&appKey=jlg88lyxz7siqtmr&openBs=openbs'+'&signEnt='+ encodeURIComponent(5),//链接
success: function (res) {
resolve(res);
},
fail: function () {
reject('分享失败');
},
cancel: function () {
reject('分享取消');
}
});
});
}
iqiyi.onShare({
title: '尖叫之夜门票、现金红包限时抢,手慢无!',
desc: '立即参与',
link: 'http://activity.m.duibatest.com.cn/hdtool/index?id=23282&appKey=jlg88lyxz7siqtmr&openBs=openbs'+'&signEnt='+ encodeURIComponent(5),
dialogTitle: 'onShare 分享选择浮层在这里',
success: function () {
setResult('分享成功');
},
fail: function () {
setResult('分享失败');
},
cancel: function () {
setResult('分享取消');
}
});
</script>
<script>
// 网鱼网咖图标额外奖励插件
......
No preview for this file type
......@@ -2,11 +2,14 @@
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/IndexUISkin.exml",
"resource/skins/IndexSceneSkin.exml",
"resource/skins/LoadingSceneSkin.exml",
"resource/skins/LoadingSkin.exml",
"resource/skins/RulePanelSkin.exml",
"resource/skins/ToastPanelSkin.exml",
"resource/skins/Objs/CropSkin.exml",
"resource/skins/Objs/LandSkin.exml",
"resource/skins/ui/IconButtonSkin.exml",
"resource/skins/ui/ProgressBarSkin.exml",
"resource/skins/ui/TimeProgressBarSkin.exml"
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<w:Config id="16e64c53e86"/>
<e:Group id="index_group" verticalCenter="0" horizontalCenter="0" height="1624" width="750">
<e:Group verticalCenter="0" horizontalCenter="0" height="1624" width="750">
<e:Image source="index_bg_png" horizontalCenter="0" verticalCenter="0" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Group id="gameLayer" left="0" top="0" bottom="0" right="0" horizontalCenter="0" verticalCenter="0"/>
<e:Group id="uiLayer" left="0" top="0" bottom="0" right="0" horizontalCenter="0" verticalCenter="0">
</e:Group>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<w:Config id="16e64c53e86"/>
<e:Image source="index_bg_png" horizontalCenter="0" verticalCenter="0" x="0" y="0" scaleX="1" scaleY="1" visible="false"/>
<e:Group id="uiLayer" left="0" top="0" bottom="0" right="0" horizontalCenter="0" verticalCenter="0">
<e:Group id="btnGroup" y="1242" left="0" right="182" anchorOffsetX="0">
<e:Button id="taskBtn" label="" x="143" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="任务_png" source.down="任务_png" source.disabled="任务_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="warehouseBtn" label="" x="359" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="仓库_png" source.down="仓库_png" source.disabled="仓库_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Group id="propPanel" y="1165" width="182" height="198" right="0">
<e:Group x="11" y="0" width="171" height="62">
<e:Image source="加速卡_png" x="0" y="0"/>
<e:Label id="speedNum" text="× 2" size="28" scaleX="1" scaleY="1" right="0" anchorOffsetX="0" width="108" anchorOffsetY="0" height="50" verticalAlign="middle" verticalCenter="4"/>
</e:Group>
<e:Group x="12" y="71" width="170" height="63">
<e:Image source="饲料_png" x="0" y="0"/>
<e:Label id="foodNum" text="× 2" size="28" scaleX="1" scaleY="1" right="0" anchorOffsetX="0" width="108" anchorOffsetY="0" height="50" verticalAlign="middle" verticalCenter="3"/>
</e:Group>
<e:Group x="0" y="144">
<e:Image source="浇水_png" x="0" y="0"/>
<e:Label id="waterNum" text="× 2" size="28" scaleX="1" scaleY="1" anchorOffsetX="0" right="0" width="108" anchorOffsetY="0" height="50" verticalAlign="middle" verticalCenter="0"/>
</e:Group>
</e:Group>
<e:Group id="avatarPanel" x="26" y="236" width="252" height="88">
<e:Image source="头像面板_png" x="0" y="0"/>
<e:Image source="头像背景_png" x="6" y="5"/>
<e:Image source="默认头像_png" x="8" y="8" width="58" height="58"/>
<e:Image id="avaterMask" source="默认头像_png" x="8" y="8" width="58" height="58"/>
<e:Label id="userName" text="十一的欢趣庄园" x="79" y="10" size="20"/>
<e:Label id="userGold" text="欢趣豆:23" x="78" y="41" size="20"/>
<e:Image id="medal" source="勋章_png" x="44" y="49"/>
</e:Group>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ss" width="276" height="240" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="cropImg" horizontalCenter="0" verticalCenter="0" source=""/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LandSkin" width="363" height="280" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="land" source="plant_land_none_png" bottom="9" left="15"/>
<e:Image id="fence" source="篱笆_png" left="0" top="37"/>
<e:Image id="trough" source="食槽_png" left="0" bottom="0"/>
</e:Skin>
\ No newline at end of file
import Scene from "../../views/Scene";
import IndexUI from "./IndexUI";
import Land from "./Objs/Land";
export default class IndexScene extends Scene {
public index_group: eui.Group;
public gameLayer:eui.Group;
public indexUI:IndexUI;
constructor(data?) {
super(data);
}
protected getTapEvts(): any[] {
return super.getTapEvts().concat([]);
}
private onTouchTap(e: egret.TouchEvent) {
......@@ -25,7 +29,11 @@ export default class IndexScene extends Scene {
}
private initUI(): void {
this.indexUI = new IndexUI();
this.addChild(this.indexUI);
let s = new Land();
this.addChild(s);
}
destroy() {
......
import Logger = egret.Logger;
export default class IndexUI extends eui.Component {
public gameLayer: eui.Group;
public uiLayer: eui.Group;
public taskBtn: eui.Button;
public warehouseBtn: eui.Button;
public speedNum: eui.Label;
public foodNum: eui.Label;
public waterNum: eui.Label;
public propInfoPanel: eui.Component;
constructor() {
super();
this.skinName = "resource/skins/IndexUISkin.exml";
this.initUI();
}
private initUI(): void {
}
}
\ No newline at end of file
class LandMgr {
}
\ No newline at end of file
import { getSkinPath } from "../../../utils";
enum CROP_TYPE {
NONE = -1, // 啥也没有
CHICKEN = 'chicken', // 鸡
CATTLE = 'cattle', // 牛
CORN = 'corn', // 玉米
WHEAT = 'wheat', // 小麦
}
enum CROP_STATE {
NONE = -1, // 啥也没有
BABY = 0, // 刚种
HALF = 1, // 半成熟
DONE = 2, // 成熟
}
export default class Crop extends eui.Component {
public cropImg: eui.Image;
private data = null;
private type: CROP_TYPE;
private state: CROP_STATE;
constructor(data?) {
super();
this.skinName = getSkinPath('Objs/Crop');
this.data = data || null;
this.x = 46.5;
this.y = 20;
this.initUI()
}
private initUI() {
this.changeType(CROP_TYPE.WHEAT);
this.changeState(CROP_STATE.BABY);
}
// 改变状态积
private changeState(state: CROP_STATE) {
if(state == this.state) {
return;
}
this.state = state; // 设置状态
this.type != -1 && this.state != -1 && (this.cropImg.source = `plant_${this.type}_${this.state}_png`);
switch(this.state) {
case CROP_STATE.NONE: // 啥也没有
break;
case CROP_STATE.BABY: // 刚种
break;
case CROP_STATE.HALF: // 半成熟
break;
case CROP_STATE.DONE: // 成熟
break;
default:
break;
}
}
// 改变类型
private changeType(type: CROP_TYPE) {
if(type == this.type) {
return;
}
this.type = type; // 设置状态
this.type != -1 && this.state != -1 && (this.cropImg.source = `plant_${this.type}_${this.state}_png`);
switch(this.type) {
case CROP_TYPE.NONE: // 啥也没有
break;
case CROP_TYPE.CHICKEN: // 鸡
break;
case CROP_TYPE.CATTLE: // 牛
break;
case CROP_TYPE.CORN: // 玉米
break;
case CROP_TYPE.WHEAT: // 小麦
break;
default:
break;
}
}
}
\ No newline at end of file
import { getSkinPath } from "../../../utils";
import Crop from "./Crop";
enum LAND_STATE {
NONE = 'none', // 无
ACTIVE = 'active', // 点击
PLANT = 'plant', // 植物
ANIMAL = 'animal' // 动物
}
export default class Land extends eui.Component {
public land: eui.Image;
public fence: eui.Image;
public trough: eui.Image;
private data = null;
private state: LAND_STATE;
constructor(data?) {
super();
this.skinName = getSkinPath('Objs/Land');
this.data = data || null;
this.initUI()
}
private initUI() {
this.changeState(LAND_STATE.NONE);
let t = new Crop();
this.addChild(t);
}
// 改变状态积
private changeState(state: LAND_STATE) {
if(state == this.state) {
return;
}
this.state = state; // 设置状态
this.land.source = `plant_land_${this.state}_png`; // 设置图片
this.fence.visible = (this.state == LAND_STATE.ANIMAL); // 显示栅栏
this.trough.visible = (this.state == LAND_STATE.ANIMAL); // 显示食槽
switch(this.state) {
case LAND_STATE.NONE: // 啥也没有
break;
case LAND_STATE.ACTIVE: // 点击
break;
case LAND_STATE.PLANT: // 植物
break;
case LAND_STATE.ANIMAL: // 动物
break;
default:
break;
}
}
}
\ No newline at end of file
import { ModuleTypes } from "./sceneTypes";
import IndexScene from "../Scenes/indexScene/IndexScene";
import IndexScene from "../Scenes/IndexScene/IndexScene";
import LoadingScene from "../Scenes/loadingScene/LoadingScene";
import RulePanel from "../Panels/RulePanel/RulePanel";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment