Commit 109f1158 authored by 赤子奈落's avatar 赤子奈落

new main menu

parent b136c258
using DG.Tweening;
using UnityEngine;
public class MenuButtonHover : MonoBehaviour
{
Transform label;
Transform label2;
Transform description;
Collider collider_;
bool hover;
void Start()
{
label = transform.Find("!label");
label2 = transform.Find("!label2");
description = transform.Find("!description");
collider_ = GetComponent<Collider>();
}
void Update()
{
if (Program.pointedCollider == collider_ && !hover)
{
description.DOLocalMoveX(220, 0.15f);
label.gameObject.SetActive(false);
label2.gameObject.SetActive(true);
hover = true;
}
else if(Program.pointedCollider != collider_ && hover)
{
description.DOLocalMoveX(0, 0.15f);
label.gameObject.SetActive(true);
label2.gameObject.SetActive(false);
hover = false;
}
}
}
fileFormatVersion: 2
guid: f01df3cdce5c7554ca87595f15d8d0be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -85,6 +85,7 @@ public class WindowServantSP : Servant
var v = new Vector3();
v.x = Mathf.Clamp(Config.getFloat("x_" + gameObject.name), -0.5f, 0.5f) * Screen.width;
v.y = Mathf.Clamp(Config.getFloat("y_" + gameObject.name), -0.5f, 0.5f) * Screen.height;
if(gameObject.name != "trans_menu")
gameObject.transform.localPosition = v;
var panelKIller = gameObject.GetComponent<panelKIller>();
if (panelKIller == null) panelKIller = gameObject.AddComponent<panelKIller>();
......
This diff is collapsed.
fileFormatVersion: 2
guid: 4e3c1289cf09fad40bde488731159a6a
guid: 7512a11de2c2af1449714e45670f0482
PrefabImporter:
externalObjects: {}
userData:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment