コード例 #1
0
    public HumanEvent(HumanEvent other)
    {
        EventType = other.EventType;
        IsParty   = other.IsParty;

        Prefabs          = other.Prefabs;
        TipTexts         = other.TipTexts;
        PartyAnimations  = other.PartyAnimations;
        WordsAfterCaught = other.WordsAfterCaught;

        PoliceWarningTexts  = other.PoliceWarningTexts;
        PoliceWarningAudios = other.PoliceWarningAudios;
    }
コード例 #2
0
    /// <summary>
    /// 获取各类活动的目的地点
    /// </summary>
    public Vector3 GetTargetPos(HumanEventType type)
    {
        if (!Event2Pos.ContainsKey(type))
        {
            return(Vector3.zero);
        }

        EventPositions eventPositions = Event2Pos[type];

        if (eventPositions.Positions.Count > 0)
        {
            return(eventPositions.Positions[Random.Range(0, eventPositions.Positions.Count)]);
        }
        else
        {
            return(Vector3.zero);
        }
    }