[Document]翻Actor Pawn看的一些可能有用的东西

//=============================================================================
//
// Called immediately before gameplay begins.
//
simulated event PreBeginPlay()
{
    // important that this comes before Super so mutators can modify it
    if (HealthMax == 0)
    {
        HealthMax = default.Health;
    }

    Super.PreBeginPlay();

    Instigator = self;
    SetDesiredRotation(Rotation);
    EyeHeight = BaseEyeHeight;
}

PreBeginPlay()时会将Instigator设置成Pawn自己,然后Instigator会被其他类更改

posted @ 2017-07-11 17:14  ArHShRn  阅读(172)  评论(0编辑  收藏  举报