Exemplo n.º 1
0
 void Add()
 {
     Common.Auto.ThriftVector3 pos = new Common.Auto.ThriftVector3();
     m_Config.Path.Insert(++curPos, pos);
     helper.AddObj(curPos, pos.GetVector3());
     RefreshDisplayString();
 }
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            ThriftVector3 pos = new ThriftVector3();
            pos.X = funcdata.ParamIntList[0];
            pos.Y = funcdata.ParamIntList[1];
            pos.Z = funcdata.ParamIntList[2];

            ThriftVector3 rot = new ThriftVector3();
            rot.X = 0;
            rot.Y = funcdata.ParamIntList[3];
            rot.Z = 0;

            ThriftVector3 scal = new ThriftVector3();
            scal.X = funcdata.ParamIntList[4];
            scal.Y = funcdata.ParamIntList[4];
            scal.Z = funcdata.ParamIntList[4];
            GameObject elem = EffectContainer.EffectFactory(funcdata.ParamStringList[0]);
            elem.transform.position = pos.GetVector3();
            elem.transform.eulerAngles = rot.GetVector3();
            elem.transform.localScale = scal.GetVector3();
        }
        catch
        {

        }
        
        return EFuncRet.Continue;
    }
    private void OnGUI()
    {
        DrawBaseInfo();
        GUILayout.Space(5f);
        Color n = EditorGUILayout.ColorField("New Color", new Color(m_Config.GetVector3().x, m_Config.GetVector3().y, m_Config.GetVector3().z));

        m_Config.SetVector3(new Vector3(n.r, n.g, n.b));
        GUILayout.Space(5f);
    }
Exemplo n.º 4
0
    protected override void Execute()
    {
        if (TargetObjects == null || TargetObjects.Count <= 0)
        {
            return;
        }

        Vector3 colRGB   = color_config.GetVector3();
        Color   newColor = new Color(colRGB.x, colRGB.y, colRGB.z);

        foreach (GameObject obj in TargetObjects)
        {
            obj.GetComponent <Renderer>().sharedMaterial.color = newColor;
        }
    }
Exemplo n.º 5
0
 void Add()
 {
     Common.Auto.ThriftVector3 pos = new Common.Auto.ThriftVector3();
     m_Config.Path.Insert(++curPos, pos);
     helper.AddObj(curPos,pos.GetVector3());
     RefreshDisplayString();
 }