You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
48 lines
1.4 KiB
using JetBrains.Annotations;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor.Experimental.GraphView;
|
|
using UnityEngine;
|
|
|
|
public class LevelNew : MonoBehaviour
|
|
{
|
|
public static LevelNew Instance;
|
|
public GameObject area;
|
|
public GameObject move;
|
|
public GameObject view;
|
|
public GameObject showImg;
|
|
public GameObject minMap;
|
|
public CameraController cameraManager;
|
|
public ButtonExtension upBtn;
|
|
public ButtonExtension downBtn;
|
|
public ButtonExtension leftBtn;
|
|
public ButtonExtension rightBtn;
|
|
public int curArea=0;
|
|
|
|
void Awake() {
|
|
Instance = this;
|
|
cameraManager.Init();
|
|
}
|
|
void Start()
|
|
{
|
|
upBtn.onPress.AddListener(() => { CameraController.Instance.MoveMainCamera(-Vector3.back); });
|
|
downBtn.onPress.AddListener(() => { CameraController.Instance.MoveMainCamera(Vector3.back); });
|
|
leftBtn.onPress.AddListener(() => { CameraController.Instance.MoveMainCamera(Vector3.left); });
|
|
rightBtn.onPress.AddListener(() => { CameraController.Instance.MoveMainCamera(-Vector3.left); });
|
|
}
|
|
|
|
public void StartGame() {
|
|
area.SetActive(true);
|
|
move.SetActive(true);
|
|
view.SetActive(true);
|
|
showImg.SetActive(true);
|
|
minMap.SetActive(true);
|
|
LevelNewTask.Instacne.FinishTask(0);
|
|
}
|
|
|
|
public void setArea(int index) {
|
|
curArea = index;
|
|
}
|
|
}
|