Merge remote-tracking branch 'origin/main' into main_ZYT
# Conflicts: # Assets/FR2_Cache.asset # ProjectSettings/ProjectSettings.asset
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Valheim
|
||||
[SyncVar]
|
||||
public long vistEnd = 0;
|
||||
// 总游玩时长
|
||||
private int vistAllTime = (int)(60 * 10F);
|
||||
private int vistAllTime = (int)(60 * 15F);
|
||||
// 游戏是否结束
|
||||
[NonSerialized]
|
||||
[SyncVar]
|
||||
@@ -350,7 +350,7 @@ namespace Valheim
|
||||
}
|
||||
|
||||
public bool isShowPetWorld;
|
||||
public void ShowPetWorld(GameObject door)
|
||||
public void ShowPetWorld(GameObject door=null)
|
||||
{
|
||||
if(isShowPetWorld)
|
||||
return;
|
||||
@@ -382,8 +382,8 @@ namespace Valheim
|
||||
});
|
||||
UserJoinPet();
|
||||
}
|
||||
//other.gameObject.GetComponent<SphereCollider>().enabled = false;
|
||||
NetworkServer.Destroy(door);
|
||||
if(door!=null)
|
||||
NetworkServer.Destroy(door);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -404,6 +404,7 @@ namespace Valheim
|
||||
|
||||
public void CreateBadge(Vector3 pos,bool isRotate)
|
||||
{
|
||||
isShowPetWorld = false;
|
||||
GameObject obj = Instantiate(badgePres[curMapId]);
|
||||
NetworkServer.Spawn(obj);
|
||||
obj.transform.position = pos+new Vector3(0,1,0);
|
||||
@@ -1926,7 +1927,7 @@ namespace Valheim
|
||||
{
|
||||
if(isShowBattleArea)
|
||||
return;
|
||||
isShowPetWorld = true;
|
||||
isShowBattleArea = true;
|
||||
//触发区域怪物
|
||||
GameInit.Ins.self.ClosePathGuide();
|
||||
StartCoroutine(CreateBattleAreaEnemy());
|
||||
|
||||
@@ -91,8 +91,5 @@ public class HUD : UIBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
// Debug.Log("3333333:" + );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,24 @@ public class Badge : MonoBehaviour
|
||||
|
||||
public bool isFly;
|
||||
|
||||
private bool _isEnd;
|
||||
|
||||
public void Init(bool curIsRotate)
|
||||
{
|
||||
isRotate=curIsRotate;
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
isFly = true;
|
||||
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
if(_isEnd)
|
||||
return;
|
||||
_isEnd = true;
|
||||
GameManager.Ins.ShowPetWorld();
|
||||
NetworkServer.Destroy(gameObject);
|
||||
},6f);
|
||||
}, 6f);
|
||||
_isEnd = false;
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
@@ -34,12 +45,11 @@ public class Badge : MonoBehaviour
|
||||
{
|
||||
if (other.CompareTag("Weapon")|| other.CompareTag("Player"))
|
||||
{
|
||||
GameObject obj= GameManager.Ins.CreateDoorCoiider(new Vector3(transform.position.x,0,transform.position.z), Vector3.zero);
|
||||
NetworkServer.Destroy(gameObject);
|
||||
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
GameManager.Ins.ShowPetWorld(obj);
|
||||
},5f);
|
||||
if(_isEnd)
|
||||
return;
|
||||
_isEnd = true;
|
||||
GameManager.Ins.ShowPetWorld();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,9 +59,13 @@ public class Badge : MonoBehaviour
|
||||
Vector3 newPos = MRNetworkManager.Ins.roomSlots[0].transform.position;
|
||||
newPos.y = 0.8f;
|
||||
transform.position = Vector3.MoveTowards(transform.position, newPos, 4f * Time.deltaTime);
|
||||
|
||||
if ( Vector3.Distance(transform.position, newPos) < 0.3f)
|
||||
{
|
||||
|
||||
if(_isEnd)
|
||||
return;
|
||||
_isEnd = true;
|
||||
GameManager.Ins.ShowPetWorld();
|
||||
NetworkServer.Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class AiDr : NetworkBehaviour
|
||||
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
ToGameState();
|
||||
},4f);
|
||||
},8f);
|
||||
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
if (curState == 1)
|
||||
@@ -104,7 +104,6 @@ public class AiDr : NetworkBehaviour
|
||||
{
|
||||
ChangeState(-1);
|
||||
CreateDoor();
|
||||
|
||||
},8f);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Valheim
|
||||
GameInit.Ins.self = this;
|
||||
GameManager.Ins.AddTeamCmd(index);
|
||||
//PickUpWeapon(WeaponType.LoveStuff, -999);
|
||||
PickUpWeapon(WeaponType.Hand, -999,30);
|
||||
PickUpWeapon(WeaponType.Hand, -999,50);
|
||||
CreatePathGuide();
|
||||
}
|
||||
else if (isServer)
|
||||
|
||||
Reference in New Issue
Block a user