Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wotakuro committed May 13, 2022
1 parent 836e1b4 commit 22fa162
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetToioID: 0
areaLeftUpper: {x: 46, y: 46}
areaRightDowner: {x: 312, y: 239}
rotateTime: 230
areaLeftUpper: {x: 429, y: 581}
areaRightDowner: {x: 598, y: 835}
rotateTime: 0
rotateSpeed: 65
moveSpeed: 50
moveDistance: 100
Expand Down
29 changes: 19 additions & 10 deletions Assets/Application/Scenes/HitAttackPlay.unity
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ MonoBehaviour:
resultUI: {fileID: 4658203659884232140}
disconnectToioObj: {fileID: 3355356899116303299}
isDisconnect: 0
controlWithoutMat: {fileID: 1170780614}
controlWithMat: {fileID: 2126363297872699109}
--- !u!1 &301315178
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2064,10 +2066,16 @@ PrefabInstance:
- target: {fileID: 4710826208899988778, guid: 3de2c46cbce5fb649a2a78b4c6141795,
type: 3}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3de2c46cbce5fb649a2a78b4c6141795, type: 3}
--- !u!1 &1170780614 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4710826208899988778, guid: 3de2c46cbce5fb649a2a78b4c6141795,
type: 3}
m_PrefabInstance: {fileID: 1170780613}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1233738001 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4526601073518467227, guid: 927f2ec9d81d2d24d8f01f49458f2efb,
Expand Down Expand Up @@ -3827,30 +3835,25 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667333, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
propertyPath: rotateTime
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667333, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
propertyPath: areaLeftUpper.x
value: 429
value: 110
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667333, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
propertyPath: areaLeftUpper.y
value: 581
value: 160
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667333, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
propertyPath: areaRightDowner.x
value: 598
value: 380
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667333, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
propertyPath: areaRightDowner.y
value: 835
value: 340
objectReference: {fileID: 0}
- target: {fileID: 2126363297409667334, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
Expand Down Expand Up @@ -3909,6 +3912,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 969abceb5c271414ca600d2b04b3947c, type: 3}
--- !u!1 &2126363297872699109 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2126363297409667332, guid: 969abceb5c271414ca600d2b04b3947c,
type: 3}
m_PrefabInstance: {fileID: 2126363297872699108}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3355356899116303298 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8333371930122159419, guid: ab28be22e0ef928478c386f12b7c1089,
Expand Down
27 changes: 27 additions & 0 deletions Assets/Application/Scripts/Controll/WaitForToioGroundCheck.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Collections;
using toio;
using UnityEngine;

namespace BMProject
{
public class WaitForToioGroundCheck : CustomYieldInstruction
{
private double time;
private Cube cube;
public WaitForToioGroundCheck(Cube c)
{
this.cube = c;
time = Time.timeAsDouble;
}

public override bool keepWaiting
{
get
{
if (cube.isGrounded) { return false; }
if (Time.timeAsDouble - time > 2.0) { return false; }
return true;
}
}
}
}
11 changes: 11 additions & 0 deletions Assets/Application/Scripts/Controll/WaitForToioGroundCheck.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Application/Scripts/HitAttack.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private void Awake()

async void Start()
{
controller = ToioController.GetToioController(0);

waitingToioConnect.StartWaiting();
this.cubeManager = ToioConnectionMgr.Instance.cubeManager;
Expand All @@ -66,16 +65,35 @@ async void Start()
this.StartCoroutine(PlayStart());
}

// todo 仮
[SerializeField]
private GameObject controlWithoutMat;
[SerializeField]
private GameObject controlWithMat;

// プレイ開始
private IEnumerator PlayStart()
{
yield return new WaitForToioGroundCheck(this.cube);
if (this.cube.isGrounded )
{
controlWithMat.SetActive(true);
}
else
{
controlWithoutMat.SetActive(true);
}

startTimeline.gameObject.SetActive(true);
startTimeline.Play();
while(startTimeline.state == PlayState.Playing)
{
yield return null;
}


controller = ToioController.GetToioController(0);

this.controller.InitializeController(cubeManager, cube);
this.eventCtrl.InitCube(cubeManager, cube);
this.leftTimer.CountStart(OnTimeOver);
Expand Down
87 changes: 44 additions & 43 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: Wotakuro
productName: ToioBMSheet
productName: ToioBMProj
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
Expand Down Expand Up @@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.1
bundleVersion: 0.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down Expand Up @@ -392,38 +392,40 @@ PlayerSettings:
m_SubKind: App Store
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
- m_Textures:
- {fileID: 2800000, guid: 7af184376d81a8e4ebf45ac679e3b4de, type: 3}
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
- m_Textures:
- {fileID: 2800000, guid: 7af184376d81a8e4ebf45ac679e3b4de, type: 3}
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures:
- {fileID: 2800000, guid: dc75d7c18a144a147a40c027fe53751c, type: 3}
- {fileID: 2800000, guid: 7af184376d81a8e4ebf45ac679e3b4de, type: 3}
m_Width: 192
m_Height: 192
m_Kind: 0
Expand Down Expand Up @@ -459,35 +461,34 @@ PlayerSettings:
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures:
- {fileID: 2800000, guid: dc75d7c18a144a147a40c027fe53751c, type: 3}
m_Width: 36
m_Height: 36
m_Kind: 1
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
m_BuildTargetBatching:
- m_BuildTarget: Android
Expand Down

0 comments on commit 22fa162

Please sign in to comment.