예제 #1
0
파일: WorldState.cs 프로젝트: jsjxsy/wushi
    public void SetWSProperty(WorldStateProp other)
    {
        if (other == null)
        {
            return;
        }

        switch (other.PropType)
        {
        case E_PropType.E_BOOL:
            SetWSProperty(other.PropKey, other.GetBool());
            break;

        case E_PropType.E_INT:
            SetWSProperty(other.PropKey, other.GetInt());
            break;

        case E_PropType.E_FLOAT:
            SetWSProperty(other.PropKey, other.GetFloat());
            break;

        case E_PropType.E_VECTOR:
            SetWSProperty(other.PropKey, other.GetVector());
            break;

        case E_PropType.E_AGENT:
            SetWSProperty(other.PropKey, other.GetAgent());
            break;

        case E_PropType.E_EVENT:
            SetWSProperty(other.PropKey, other.GetEvent());
            break;

        case E_PropType.E_ORDER:
            SetWSProperty(other.PropKey, other.GetEvent());
            break;

        default:
            Debug.LogError("error in SetWSProperty " + other.PropKey.ToString());
            break;
        }
    }
예제 #2
0
    public void SetWSProperty(WorldStateProp other)
    {
        if (other == null)
        {
            return;
        }

        switch (other.PropType)
        {
        case E_PropType.Bool:
            SetWSProperty(other.PropKey, other.GetBool());
            break;

        case E_PropType.Int:
            SetWSProperty(other.PropKey, other.GetInt());
            break;

        case E_PropType.Float:
            SetWSProperty(other.PropKey, other.GetFloat());
            break;

        case E_PropType.Vector:
            SetWSProperty(other.PropKey, other.GetVector());
            break;

        case E_PropType.Agent:
            SetWSProperty(other.PropKey, other.GetAgent());
            break;

        case E_PropType.CoverState:
            SetWSProperty(other.PropKey, other.GetCoverState());
            break;

        default:
            Debug.LogError("error in SetWSProperty " + other.PropKey.ToString());
            break;
        }
    }