12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class RollerController : MonoBehaviour
- {
- public GameObject Player;
- public Animator Anim;
- public MeshRenderer MeshPlayer;
- public MeshRenderer MeshPlayerFemale;
- public GameObject Roller;
- public Transform TrCamera;
- void Start()
- {
-
- }
- void OnDestroy()
- {
-
- }
- public void Initializaion(GameObject data)
- {
- MeshPlayer.gameObject.SetActive(false);
- MeshPlayerFemale.gameObject.SetActive(false);
- Debug.Log("Initializaion " + data);
- Player = data;
- switch(Core.Instance.CurGender)
- {
- case Core.Gender.Male:
- MeshPlayer.gameObject.SetActive(true);
- MeshPlayer.material = data.GetComponentInChildren<Renderer>().material;
- break;
- case Core.Gender.Female:
- MeshPlayerFemale.gameObject.SetActive(true);
- MeshPlayerFemale.material = data.GetComponentInChildren<Renderer>().material;
- break;
- }
- Anim.SetBool("Move", true);
- }
-
- public void StopRoller()
- {
- MeshPlayer.gameObject.SetActive(false);
- MeshPlayerFemale.gameObject.SetActive(false);
- Anim.SetBool("Move", false);
- Roller.SetActive(false);
- }
-
- }
|