Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using ESX.PROCESSOR;
- using GraphProcessor;
- [System.Serializable, NodeMenuItem("ESXBehaviour/Insertar valor en una variable (local)")]
- public class _CambiarVariableLocal : LinearConditionalNode
- {
- [HideInInspector] public MonoBehaviour script;
- [Input(name = "Nombre de la variable"), SerializeField]
- public string var;
- [Input(name = "Valor nuevo")]
- public object valor;
- public override string name => "Insertar valor en una variable (local)";
- protected override void Process()
- {
- GraphBehaviour behaviour = script.GetComponent<GraphBehaviour>();
- behaviour.graph.SetParameterValue(var, valor);
- }
- }
- [System.Serializable, NodeMenuItem("ESXBehaviour/Obtener valor de una variable (local)")]
- public class _ObtenerVariableLocal : LinearConditionalNode
- {
- [HideInInspector] public MonoBehaviour script;
- [Input(name = "Nombre de la variable"), SerializeField]
- public string var;
- [Output(name = "Valor obtenido")]
- public object valor;
- public override string name => "Obtener valor de una variable (local)";
- protected override void Process()
- {
- GraphBehaviour behaviour = script.GetComponent<GraphBehaviour>();
- var getted = behaviour.graph.GetParameterValue(var);
- valor = getted;
- }
- }
- #if PHOTON_UNITY_NETWORKING
- [System.Serializable, NodeMenuItem("ESXBehaviour/Insertar valor en una variable (local pun 2)")]
- public class _CambiarVariableLocal_Pun2 : LinearConditionalNode
- {
- [HideInInspector] public MonoBehaviour script;
- [Input(name = "Nombre de la variable"), SerializeField]
- public string var;
- [Input(name = "Valor nuevo")]
- public object valor;
- public override string name => "Insertar valor en una variable (local pun 2)";
- protected override void Process()
- {
- Pun2_GraphBehaviour behaviour = script.GetComponent<Pun2_GraphBehaviour>();
- behaviour.graph.SetParameterValue(var, valor);
- }
- }
- [System.Serializable, NodeMenuItem("ESXBehaviour/Obtener valor de una variable (local pun 2)")]
- public class _ObtenerVariableLocal_Pun2 : LinearConditionalNode
- {
- [HideInInspector] public MonoBehaviour script;
- [Input(name = "Nombre de la variable"), SerializeField]
- public string var;
- [Output(name = "Valor obtenido")]
- public object valor;
- public override string name => "Obtener valor de una variable (local pun 2)";
- protected override void Process()
- {
- Pun2_GraphBehaviour behaviour = script.GetComponent<Pun2_GraphBehaviour>();
- var getted = behaviour.graph.GetParameterValue(var);
- valor = getted;
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement