Table of Contents

Class BaseLerpMotion<IArgs>

Namespace
TrinketTinker.Companions.Motions
Assembly
TrinketTinker.dll

Base version of LerpMotion, for use with inheritance

public class BaseLerpMotion<IArgs> : Motion<IArgs>, IMotion where IArgs : LerpArgs

Type Parameters

IArgs
Inheritance
Motion<IArgs>
BaseLerpMotion<IArgs>
Implements
Derived
Inherited Members

Constructors

BaseLerpMotion(TrinketTinkerCompanion, MotionData, VariantData)

Base version of LerpMotion, for use with inheritance

public BaseLerpMotion(TrinketTinkerCompanion companion, MotionData mdata, VariantData vdata)

Parameters

companion TrinketTinkerCompanion
mdata MotionData
vdata VariantData

Properties

Lerp

Variable for how much interpolation happened so far.

protected float Lerp { get; set; }

Property Value

float

Methods

CheckOverlap()

public bool CheckOverlap()

Returns

bool

GetOffset()

Get offset

public override Vector2 GetOffset()

Returns

Vector2

GetRotation()

Get sprite rotation

protected override float GetRotation()

Returns

float

Rotation in radians

IsMoving()

Moving flag used for basis of anim

protected override bool IsMoving()

Returns

bool

OnOwnerWarp()

Update light source when owner changes location

public override void OnOwnerWarp()

ShouldMove()

protected override bool ShouldMove()

Returns

bool

UpdateLocal(GameTime, GameLocation)

Update info that should change every tick, for owner only. Netfield changes should happen here.

public override void UpdateLocal(GameTime time, GameLocation location)

Parameters

time GameTime
location GameLocation