bool ShiftAppearance(NPC_Type aOtherNPCType) { TestInvariant(); if (mShiftedNPCType == aOtherNPCType) { return(false); } if (mShiftedNPCType != null) { mShiftedAppearance = null; mShiftedNPCType = null; mShiftedNPCTypeID = 0; } TestInvariant(); if (aOtherNPCType != null) { mShiftedNPCType = aOtherNPCType; mShiftedNPCTypeID = mShiftedNPCType.GetResourceId(); mShiftedAppearance = aOtherNPCType.Appearance.CreateAppearance((Outer as Game_Pawn), mShiftedAppearance, true); } if (mShiftedAppearance != null && mShiftedNPCType.Equipment != null) { mShiftedNPCType.Equipment.ApplyToAppearance(GetCurrent() as Game_EquippedAppearance); } GetCurrent().Apply(); TestInvariant(); return(true); }
public void InstallBaseAppearance(NPC_Type aNPCType) { UnityEngine.Assertions.Assert.IsNotNull(aNPCType); (Outer as Game_Pawn).BaseAppearance = aNPCType.Appearance.CreateAppearance((Outer as Game_Pawn), (Outer as Game_Pawn).BaseAppearance, false); (Outer as Game_Pawn).BaseAppearance.Apply(); }