Skip to content

Commit

Permalink
Island and movement bugs fixed, wild battle system added
Browse files Browse the repository at this point in the history
- pre urp convert commit
  • Loading branch information
MoAzza98 committed Oct 4, 2023
1 parent a10a9f4 commit 2a0a5ff
Show file tree
Hide file tree
Showing 1,226 changed files with 1,626,921 additions and 5,592 deletions.
27 changes: 27 additions & 0 deletions ToyoWorld/Assets/AreaManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AreaManager : MonoBehaviour
{

[SerializeField] BattleSystem battleSystem;
public GameObject player;
[SerializeField] Toyo wildToyo;

[SerializeField] public MapArea mapArea;

private PlayerMovement playerMovement;

// Start is called before the first frame update
void Start()
{
mapArea = FindAnyObjectByType<MapArea>();
}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions ToyoWorld/Assets/AreaManager.cs.meta

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

12 changes: 12 additions & 0 deletions ToyoWorld/Assets/Assets_URPConverterIndex.index
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"roots": ["Assets"],
"includes": [],
"excludes": [],
"options": {
"types": true,
"properties": true,
"extended": true,
"dependencies": true
},
"baseScore": 9999
}
10 changes: 10 additions & 0 deletions ToyoWorld/Assets/Assets_URPConverterIndex.index.meta

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

51 changes: 51 additions & 0 deletions ToyoWorld/Assets/BattleArea.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class BattleArea : MonoBehaviour
{
[SerializeField] public GameController controller;
float resetTimer = 5f;
// Start is called before the first frame update
void Start()
{
controller = FindAnyObjectByType<GameController>();
}

// Update is called once per frame
void Update()
{

}

private void OnTriggerEnter(Collider other)
{

}

private void OnTriggerStay(Collider other)
{

if (other.TryGetComponent(out PlayerMovement playerMove) && resetTimer < 0)
{
BattleChance();
resetTimer = 3f;
}
resetTimer -= Time.deltaTime;
//Debug.Log(resetTimer);
}

private void BattleChance()
{
float isBattle = Random.Range(0f, 100f);

if(isBattle > 10f)
{

Debug.Log("battle triggered");
controller.CallBattleStartMethod();
}

}
}
11 changes: 11 additions & 0 deletions ToyoWorld/Assets/BattleArea.cs.meta

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

22 changes: 22 additions & 0 deletions ToyoWorld/Assets/CameraSetup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Cinemachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraSetup : MonoBehaviour
{
public ThirdPersonCam playerCam;
public CinemachineFreeLook freeLookCam;

// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions ToyoWorld/Assets/CameraSetup.cs.meta

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

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

Loading

0 comments on commit 2a0a5ff

Please sign in to comment.