示例#1
0
    public void ReplaceFindTargetCmdComp(Other.ActorTag newTargetTag, Components.Target.FindTargetType newFindTargetType, Components.Target.LostTargetActionType newLostTargetActionType)
    {
        var index     = GameComponentsLookup.FindTargetCmdComp;
        var component = (Components.Target.FindTargetCmdComp)CreateComponent(index, typeof(Components.Target.FindTargetCmdComp));

        component.TargetTag            = newTargetTag;
        component.FindTargetType       = newFindTargetType;
        component.LostTargetActionType = newLostTargetActionType;
        ReplaceComponent(index, component);
    }
示例#2
0
    public void AddTargetComp(int newTargetId, Other.ActorTag newTargetTag, Components.Target.FindTargetType newFindTargetType, Components.Target.LostTargetActionType newLostTargetActionType)
    {
        var index     = GameComponentsLookup.TargetComp;
        var component = (Components.Target.TargetComp)CreateComponent(index, typeof(Components.Target.TargetComp));

        component.TargetId             = newTargetId;
        component.TargetTag            = newTargetTag;
        component.FindTargetType       = newFindTargetType;
        component.LostTargetActionType = newLostTargetActionType;
        AddComponent(index, component);
    }