made changescene a public in sceneManager.hxx
added a main menu scene added some new texture
This commit is contained in:
parent
f1c7f42e13
commit
c91897f46a
Binary file not shown.
Binary file not shown.
|
@ -55,3 +55,10 @@
|
||||||
Perspective: true
|
Perspective: true
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
|
- EID: 4
|
||||||
|
Name: Default
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components: ~
|
||||||
|
Scripts:
|
||||||
|
- Type: MainMenu
|
|
@ -120,7 +120,7 @@
|
||||||
delayTimer: 1
|
delayTimer: 1
|
||||||
aimingLength: 1.5
|
aimingLength: 1.5
|
||||||
- Type: StateMachine
|
- Type: StateMachine
|
||||||
currentStateName: Idle State
|
currentStateName: ""
|
||||||
currentAnimName: ""
|
currentAnimName: ""
|
||||||
- EID: 3
|
- EID: 3
|
||||||
Name: HoldingPoint
|
Name: HoldingPoint
|
||||||
|
@ -140,13 +140,13 @@
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 0, y: 0, z: 0}
|
Translate: {x: 0, y: 0, z: 0}
|
||||||
Rotate: {x: -0.361278683, y: 4.97423792, z: 0}
|
Rotate: {x: -0.738241911, y: 0.48064509, z: 0}
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Camera Component:
|
Camera Component:
|
||||||
Position: {x: 0.330392599, y: -2.72767258, z: 5.02710676}
|
Position: {x: -0.0897406489, y: -4.07369709, z: 3.6087606}
|
||||||
Pitch: -42.2981491
|
Pitch: -42.2981453
|
||||||
Yaw: 16.4989166
|
Yaw: 16.4989109
|
||||||
Roll: 0
|
Roll: 0
|
||||||
Width: 1920
|
Width: 1920
|
||||||
Height: 1080
|
Height: 1080
|
||||||
|
@ -275,10 +275,10 @@
|
||||||
- Type: GameManager
|
- Type: GameManager
|
||||||
itemPool: 12
|
itemPool: 12
|
||||||
zonePool: 15
|
zonePool: 15
|
||||||
currGameState: 3
|
currGameState: 0
|
||||||
totalItemCount: 2
|
totalItemCount: 0
|
||||||
Score: 0
|
Score: 0
|
||||||
timer: 4.00741768
|
timer: 50
|
||||||
- EID: 12
|
- EID: 12
|
||||||
Name: ItemPool
|
Name: ItemPool
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
|
|
@ -92,19 +92,14 @@ public class PlayerController : Script
|
||||||
|
|
||||||
//rigidbody check
|
//rigidbody check
|
||||||
rb = GetComponent<RigidBody>();
|
rb = GetComponent<RigidBody>();
|
||||||
if (rb == null)
|
if (!rb)
|
||||||
Debug.LogError("RigidBody is NULL!");
|
Debug.LogError("RigidBody is NULL!");
|
||||||
|
|
||||||
//Transform check
|
//Transform check
|
||||||
tranform = GetComponent<Transform>();
|
tranform = GetComponent<Transform>();
|
||||||
if(tranform == null)
|
if(!tranform)
|
||||||
Debug.LogError("tranform is NULL!");
|
Debug.LogError("tranform is NULL!");
|
||||||
|
|
||||||
//PickAndThrow check
|
|
||||||
pat = GetScript<PickAndThrow>();
|
|
||||||
if (pat == null)
|
|
||||||
Debug.LogError("PickAndThrow is NULL!");
|
|
||||||
|
|
||||||
stateMachine = AddScript<StateMachine>();
|
stateMachine = AddScript<StateMachine>();
|
||||||
Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>();
|
Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>();
|
||||||
dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine));
|
dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine));
|
||||||
|
@ -120,6 +115,14 @@ public class PlayerController : Script
|
||||||
|
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
//PickAndThrow check
|
||||||
|
if (!pat)
|
||||||
|
{
|
||||||
|
pat = GetScript<PickAndThrow>();
|
||||||
|
if(!pat)
|
||||||
|
Debug.LogError("PickAndThrow is NULL!");
|
||||||
|
}
|
||||||
|
|
||||||
if (!cam)
|
if (!cam)
|
||||||
cam = GetComponentInChildren<Camera>();
|
cam = GetComponentInChildren<Camera>();
|
||||||
if(!camArm)
|
if(!camArm)
|
||||||
|
|
|
@ -6,17 +6,16 @@ public class GameManager : Script
|
||||||
{
|
{
|
||||||
public enum GameState
|
public enum GameState
|
||||||
{
|
{
|
||||||
MAINMENU,
|
|
||||||
START,
|
START,
|
||||||
WIN,
|
WIN,
|
||||||
LOSE,
|
LOSE
|
||||||
TOTAL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameObject itemPool;
|
public GameObject itemPool;
|
||||||
public GameObject zonePool;
|
public GameObject zonePool;
|
||||||
public GameState currGameState;
|
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
public GameState currGameState;
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
public int totalItemCount;
|
public int totalItemCount;
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
|
@ -31,7 +30,7 @@ public class GameManager : Script
|
||||||
{
|
{
|
||||||
totalItemCount = 0;
|
totalItemCount = 0;
|
||||||
Score = 0;
|
Score = 0;
|
||||||
currGameState = GameState.MAINMENU;
|
currGameState = GameState.START;
|
||||||
|
|
||||||
if (itemPool)
|
if (itemPool)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
using System;
|
using System;
|
||||||
using SHADE;
|
using SHADE;
|
||||||
|
|
||||||
public class SC_MainMenu : Script
|
public class MainMenu : Script
|
||||||
{
|
{
|
||||||
protected override void awake()
|
protected override void awake()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
if (Input.GetKey(Input.KeyCode.Space))
|
||||||
|
{
|
||||||
|
SceneManager.ChangeScene(86098106);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
public ref class SceneManager abstract sealed
|
public ref class SceneManager abstract sealed
|
||||||
{
|
{
|
||||||
static void ChangeScene(AssetID sceneAssetID);
|
public :
|
||||||
|
static void ChangeScene(AssetID sceneAssetID);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue