void OnTriggerStay2D(Collider2D other) { putOnFlg = true; if (state != STATUS.NONE) { return; } CursorManager cm = other.gameObject.GetComponent <CursorManager>(); if (cm == null) { return; } Counter += 0.1f; if (ComparisonSize(trans.sizeDelta, MAXSIZE)) { trans.sizeDelta += SetSize(Mathf.Pow(Counter, 3)); } else { trans.sizeDelta = MAXSIZE; } if (!cm.GetAccel()) { return; } state = STATUS.OPEN; }
void OnTriggerStay2D(Collider2D other) { CursorManager cm = other.gameObject.GetComponent <CursorManager>(); if (cm == null) { return; } if (!cm.GetAccel()) { return; } Debug.Log(npcButton.state); npcButton.state = NPCButton.STATUS.CLOSE; }
void OnTriggerStay2D(Collider2D other) { if (state != STATUS.NORMAL) { return; } CursorManager cm = other.gameObject.GetComponent <CursorManager>(); if (cm == null) { return; } if (!cm.GetAccel()) { return; } state = STATUS.CLOSE; }
void control() { if (send) { ic.setNum -= setNo; } send = false; if (PCursor == null) { state = STATUS.None; return; } //アイコンをマウスの後ろに移動 timer += Time.deltaTime; float n = Mathf.Min(timer / maxTime, 1.0f); Vector3 adPos; adPos.x = PCursor.transform.position.x - (PCursor.trans.sizeDelta.x * 0.6f); adPos.y = PCursor.transform.position.y - (PCursor.trans.sizeDelta.y * 0.1f); adPos.z = PCursor.transform.position.z; Vector3 value = adPos * n + PREVPOS * (1 - n); transform.position = value; if (n != 1.0f) { return; } //選択されているキャラをウィンドウに表示 windowNo.selectNo = selectNo; ic.selectChara[No + 1] = selectNo; if (!putOn) { //セレクトウィンドウ以外の時、画像を表示しない selectNo = 4; ic.selectChara[No + 1] = selectNo; return; } if (!PCursor.GetAccel()) { return; } timer = 0; state = STATUS.Decision; }