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.
47 lines
1.1 KiB
47 lines
1.1 KiB
4 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using AX.MessageSystem;
|
||
|
using System;
|
||
|
using AX.InputSystem;
|
||
|
|
||
|
[RequireComponent(typeof(FireDeployCameraManager))]
|
||
|
public class FireDeployCameraScale : MonoBehaviour {
|
||
|
|
||
|
private FireDeployCameraManager fireDeployCameraManager;
|
||
|
|
||
|
// Use this for initialization
|
||
|
void Start () {
|
||
|
fireDeployCameraManager = GetComponent<FireDeployCameraManager>();
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
|
||
|
void OnEnable()
|
||
|
{
|
||
|
MessageDispatcher.AddListener("DEPLOY_MIDDLE_MOUSE_SCROLL_COMMAND", Execute);
|
||
|
}
|
||
|
|
||
|
void OnDisable()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("DEPLOY_MIDDLE_MOUSE_SCROLL_COMMAND", Execute);
|
||
|
}
|
||
|
|
||
|
void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("DEPLOY_MIDDLE_MOUSE_SCROLL_COMMAND", Execute);
|
||
|
}
|
||
|
|
||
|
private void Execute(IMessage obj)
|
||
|
{
|
||
|
var data = (CameraCmdArgs)obj.Data;
|
||
|
|
||
|
//MessageDispatcher.SendMessage("UPDATE_ARROWORWATERSUPPLY_UIWITH", data);
|
||
|
|
||
|
fireDeployCameraManager.UpdateCameraScaleData(data.mouseScroll, data.distance);
|
||
|
}
|
||
|
}
|