Commit f9c7b00d authored by wanqing's avatar wanqing

新关卡逻辑修改

parent 1198edbe
......@@ -114,6 +114,9 @@
<Compile Include="Assets\0A2_Scripts\Services\GlobalConfig.cs" />
<Compile Include="Assets\0A2_Scripts\Services\InputServices.cs" />
<Compile Include="Assets\0A2_Scripts\Services\TimerServices.cs" />
<Compile Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Scripts\DemoFree.cs" />
<Compile Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Scripts\FreeCameraLogic.cs" />
<Compile Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Scripts\SimpleSampleCharacterControl.cs" />
<Compile Include="Assets\0D1_Effects\Epic Toon FX\Demo\Scripts\ETFXButtonScript.cs" />
<Compile Include="Assets\0D1_Effects\Epic Toon FX\Demo\Scripts\ETFXFireProjectile.cs" />
<Compile Include="Assets\0D1_Effects\Epic Toon FX\Demo\Scripts\ETFXLoopScript.cs" />
......@@ -391,12 +394,14 @@
<None Include="Assets\0C1_Models\PolygonPrototype\Shaders\Prototype_Object.shader" />
<None Include="Assets\0E1_Plugins\Easy performant outline\Resources\Easy performant outline\Shaders\Fills\EmptyFill.shader" />
<None Include="Assets\0E1_Plugins\Obi\Resources\ObiMaterials\ObiLightingBuiltIn.cginc" />
<None Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Shaders\Legacy\CelShader.shader" />
<None Include="Assets\HoleBall\Shaders\Cutout.shader" />
<None Include="Assets\HoleBall\Shaders\DepthMask.shader" />
<None Include="Assets\EasyTouchBundle\EasyTouch\_Documentation\How to migrate from EasyTouch 4.X.txt" />
<None Include="Assets\0E1_Plugins\Obi\Resources\ObiMaterials\DistanceFieldSlice.shader" />
<None Include="Assets\0E1_Plugins\Obi\Resources\ObiMaterials\ObiParticles.cginc" />
<None Include="Assets\0A2_Scripts\项目文件说明文档.txt" />
<None Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Shaders\SupercyanShader.shader" />
<None Include="Assets\0E1_Plugins\Easy performant outline\Resources\Easy performant outline\Shaders\BasicBlit.shader" />
<None Include="Assets\0E1_Plugins\Easy performant outline\Resources\Easy performant outline\Shaders\PartialBlit.shader" />
<None Include="Assets\0E1_Plugins\Obi\Resources\ObiMaterials\StandardVertexColors.shader" />
......@@ -429,6 +434,7 @@
<None Include="Assets\0E1_Plugins\RayFire\Info\CHANGELOG.txt" />
<None Include="Assets\0E1_Plugins\Obi\Plugins\libOni.bundle\Contents\Resources\CMakeLists.txt" />
<None Include="Assets\0Z2_Documents\项目文件说明文档.txt" />
<None Include="Assets\0C1_Models\Supercyan Character Pack Free Sample\Shaders\SupercyanShaderLighting.cginc" />
<None Include="Assets\0E1_Plugins\RayFire\Info\README.txt" />
<None Include="Assets\0E1_Plugins\Obi\CHANGELOG_rope.txt" />
<None Include="Assets\0D2_Shaders\moveLight 1.shader" />
......
......@@ -170,7 +170,7 @@ MonoBehaviour:
- {fileID: 8744738608159344848, guid: ede9ddf15b410904798bc74f3ca63a8c, type: 3}
- {fileID: 4567337292791389910, guid: 7a841727d29832047bb76befac15a6c3, type: 3}
- {fileID: 7109006367036189340, guid: bc146b9b911d9494faeb6d77dbe34891, type: 3}
- {fileID: 9164101802928396636, guid: 3e464a0491ac42549bc50bd3bdbc322d, type: 3}
- {fileID: 9179048184026848780, guid: 667a498393311344184f340de4e58e1b, type: 3}
--- !u!1 &707446923
GameObject:
m_ObjectHideFlags: 0
......
......@@ -4,27 +4,53 @@ using UnityEngine;
public class SixthLevelTrigger : MonoBehaviour
{
public Collider m_collider;
private Transform m_ballTrans;
private Transform m_handleTrans;
//public Collider m_collider;
//private Transform m_ballTrans;
//private Transform m_handleTrans;
//private bool m_bControl = true;
//private void Start()
//{
// m_handleTrans = BattleCtrl.instance.levelManager.curLevel.chainHandle.transform;
// m_ballTrans = BattleCtrl.instance.levelManager.curLevel.chainHandle.SteelBallTrans;
//}
//private void Update()
//{
// float varDis = Vector3.SqrMagnitude(m_ballTrans.position - m_handleTrans.position);
// if (varDis >= 20.0f && m_bControl)
// {
// m_bControl = false;
// m_collider.enabled = false;
// GameServices.timerServices.Push(this, 0.5f, delegate
// {
// m_bControl = true;
// m_collider.enabled = true;
// });
// }
//}
public Transform m_characterTrans;
private float m_minHeight = -2.0f;
private bool m_bControl = true;
private void Start()
private bool m_bControlFail = true;
protected virtual void OnTriggerEnter(Collider collider)
{
m_handleTrans = BattleCtrl.instance.levelManager.curLevel.chainHandle.transform;
m_ballTrans = BattleCtrl.instance.levelManager.curLevel.chainHandle.SteelBallTrans;
}
private void Update()
{
float varDis = Vector3.SqrMagnitude(m_ballTrans.position - m_handleTrans.position);
if (varDis >= 20.0f && m_bControl)
if (collider.gameObject.CompareTag("Target") && m_bControl)
{
m_bControl = false;
m_collider.enabled = false;
GameServices.timerServices.Push(this, 0.5f, delegate
GameServices.timerServices.Push(this, 1.0f, delegate
{
m_bControl = true;
m_collider.enabled = true;
if(m_characterTrans && m_characterTrans.position.y > m_minHeight)
{
BattleCtrl.instance.OnBattleWin();
}
});
}
}
private void Update()
{
if (m_characterTrans && m_characterTrans.position.y < m_minHeight && m_bControlFail)
{
m_bControlFail = false;
BattleCtrl.instance.OnBattleFail();
}
}
}
......@@ -77,6 +77,7 @@ public class BattleUI : MonoBehaviour
// 当前关卡再来一次
void LoadCurLevel()
{
m_loseObj.SetActive(false);
m_successObj.SetActive(false);
BattleCtrl.instance.levelManager.LoadCurLevel();
//SceneManager.LoadScene(0);
......
......@@ -496,7 +496,7 @@ GameObject:
m_Component:
- component: {fileID: 9179048183103457562}
- component: {fileID: 9179048183103457560}
- component: {fileID: 9179048183103457561}
- component: {fileID: 5746102164201891242}
m_Layer: 0
m_Name: buttonTrigger
m_TagString: Untagged
......@@ -512,7 +512,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9179048183103457563}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.46, y: 0.07, z: -0.1314039}
m_LocalPosition: {x: 2.52, y: 0.3, z: -0.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 9179048184641001737}
......@@ -529,9 +529,9 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Size: {x: 1.6, y: 0.5, z: 1.6}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &9179048183103457561
--- !u!114 &5746102164201891242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -540,14 +540,10 @@ MonoBehaviour:
m_GameObject: {fileID: 9179048183103457563}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 622119790b3ecdf479dd087fef5e6923, type: 3}
m_Script: {fileID: 11500000, guid: 3a94cf5fd0a0e7a40bd6a5a0d1491859, type: 3}
m_Name:
m_EditorClassIdentifier:
m_targetTrans: {fileID: 0}
m_buildTrans: {fileID: 0}
m_buttonTrans: {fileID: 0}
m_speed: 1
m_upSpeed: 4
m_characterTrans: {fileID: 9183499804522896930}
--- !u!1 &9179048183469887140
GameObject:
m_ObjectHideFlags: 0
......@@ -1240,7 +1236,7 @@ MonoBehaviour:
m_chainRopeView: {fileID: 0}
m_chainHandle: {fileID: 9179048183841148937}
m_camera: {fileID: 0}
curLevelIndex: 4
curLevelIndex: 5
--- !u!1 &9179048184084520149
GameObject:
m_ObjectHideFlags: 0
......@@ -2289,7 +2285,7 @@ Rigidbody:
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_Constraints: 8
m_CollisionDetection: 0
--- !u!65 &9179048184299621574
BoxCollider:
......@@ -2485,6 +2481,10 @@ PrefabInstance:
propertyPath: m_Name
value: MobileMaleFree1
objectReference: {fileID: 0}
- target: {fileID: 1144978573833690, guid: 1e8e1924bb442334c9125455634bb567, type: 3}
propertyPath: m_TagString
value: Target
objectReference: {fileID: 0}
- target: {fileID: 4749730850939948, guid: 1e8e1924bb442334c9125455634bb567, type: 3}
propertyPath: m_LocalPosition.x
value: -1.35
......
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