Candle.aspx 1.8 KB

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