123456789101112131415161718192021222324252627282930313233343536 |
- <%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="WebApplication1.About" %>
- <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="shortcut icon" href="littlefire/TemplateData/favicon.ico">
- <link rel="stylesheet" href="littlefire/TemplateData/style.css">
- <script src="littlefire/TemplateData/UnityProgress.js"></script>
- <script src="littlefire/Build/UnityLoader.js"></script>
- <script>
- var gameInstance = UnityLoader.instantiate("gameContainer", "littlefire/Build/Desktop.json", {onProgress: UnityProgress });//这里和上面的littlefire都是文件名
- function Size(size)//需要一个float值,0为熄灭,1为原始大小
- {
- //初值为0
- gameInstance.SendMessage("littlefire", "sssize", size);//这里的littlefire和sssize分别是unity中的火苗名和它身上代码的函数名,不能改
- }
- function ChangeSpeed(spd)//需要一个float值,控制变化速度
- {
- //初值为1
- gameInstance.SendMessage("littlefire", "ChangeSpeed", spd);//这里的littlefire和sssize分别是unity中的火苗名和它身上代码的函数名,不能改
- }
- setTimeout("Size(0.1)", 5000);
- setTimeout("Size(0.5)", 7000);
- </script>
- <%//下面这几行好像也不能删,我这里是删了就显示不了 %>
- <div id="gameContainer" style="width: 960px; height: 600px"></div>
- <div class="footer">
- <div class="webgl-logo"></div>
- <div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
- </div>
- </asp:Content>
|