コード例 #1
0
        public void ClearRelationshipBetweenGroups(RelationshipGroup targetGroup, Relationship relationship, bool bidirectionally = false)
        {
            Function.Call(Native.Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, relationship, Hash, targetGroup.NativeValue);

            if (bidirectionally)
            {
                Function.Call(Native.Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, relationship, targetGroup.NativeValue, Hash);
            }
        }
コード例 #2
0
        public static Relationships FromId(RelationshipGroup id)
        {
            Relationships retval = null;

            if (_instanceCache == null)
            {
                _instanceCache = new Dictionary <RelationshipGroup, Relationships>();
            }
            else if (_instanceCache.TryGetValue(id, out retval))
            {
                return(retval);
            }

            retval = new Relationships(id);
            _instanceCache.Add(id, retval);

            return(retval);
        }
コード例 #3
0
 public void RemoveRelationTo(RelationshipGroup target, RelationshipType relation)
 {
     Internal.Function.Call(0x0747, (int)relation, (int)Id, (int)target);
 }
コード例 #4
0
 private Relationships(RelationshipGroup id)
 {
     Id = id;
 }
コード例 #5
0
ファイル: Relationship.cs プロジェクト: blockspacer/gtadotnet
 public void SetRelationTo(RelationshipGroup target, RelationshipType relation)
 {
     Internal.Function.Call(0x0746, (int)relation, (int)_pedType, (int)target);
 }
コード例 #6
0
ファイル: Relationship.cs プロジェクト: blockspacer/gtadotnet
 private Relationships(RelationshipGroup id)
 {
     _pedType = id;
 }
コード例 #7
0
 public Relationship GetRelationshipBetweenGroups(RelationshipGroup targetGroup)
 {
     return(Function.Call <Relationship>(Native.Hash.GET_RELATIONSHIP_BETWEEN_GROUPS, Hash, targetGroup.NativeValue));
 }