mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 04:15:37 +03:00
04.07.2022
This commit is contained in:
39
Heli_with_panels/Assets/Scripts/UI/ClickGruzCube3.cs
Normal file
39
Heli_with_panels/Assets/Scripts/UI/ClickGruzCube3.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ClickGruzCube3 : MonoBehaviour
|
||||
{
|
||||
/*float speed = 1.0f;
|
||||
private bool isMoved = false;
|
||||
|
||||
*//* private void OnMouseDown()
|
||||
{
|
||||
Camera.main.transform.position = new Vector3(-5.4f, 2.5f, -1.2f);
|
||||
}*//*
|
||||
void OnMouseEnter()
|
||||
{
|
||||
GetComponent<Renderer>().material.color = Color.green;
|
||||
}
|
||||
void OnMouseExit()
|
||||
{
|
||||
GetComponent<Renderer>().material.color = Color.clear;
|
||||
}
|
||||
public void FixedUpdate()
|
||||
{
|
||||
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
isMoved = true;
|
||||
}
|
||||
|
||||
if (isMoved)
|
||||
{
|
||||
Camera.main.transform.position = Vector3.Lerp(Camera.main.transform.position, new Vector3(-5.4f, 2.5f, -1.2f), speed * Time.deltaTime);
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user