Battle Talent  V11
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Events | List of all members
CrossLink.FlyObject Class Reference

Used for bullet, magic FlyObject resources need to be located under the path of "FlyObject/" More...

Inherits CrossLink.PhysicsUnit.

Inherited by CrossLink.BounceBall, CrossLink.Bullet, CrossLink.FireBall, CrossLink.FireBallExplode, CrossLink.FlyAroundPath, CrossLink.FlyArrowBase, CrossLink.FlyCreature, CrossLink.FlyCurvePath, CrossLink.FlyExplode, CrossLink.FlyFlame, CrossLink.FlyMisscle, CrossLink.FlyObjectX, CrossLink.FlySlash, CrossLink.FlySummon, CrossLink.FlyThunder, CrossLink.FlyTrack, CrossLink.IceBall, CrossLink.IceSpike, CrossLink.LaserBullet, CrossLink.PushObject, CrossLink.SkyThunder, and CrossLink.TrackBall.

Public Member Functions

bool IsJustFlyStopped ()
 
void SetFlying (bool f)
 
bool IsFlying ()
 
bool IsFlyStopped ()
 
virtual void OnSpawn (InteractBase ow, Vector3 dir, float vel=-1)
 
virtual void FlyStart (Vector3 vel)
 
virtual void OnDelay (float t, float s)
 Set delayToAcc time, each frame OnDelay will be call after FlyStart function. More...
 
virtual void OnDelayEnd ()
 Call at the end of the delay timer. More...
 
virtual void OnShoot (Vector3 vel)
 
virtual void FlyStop ()
 
virtual void OnTimeOut ()
 
virtual void OnFinish ()
 
void DoFinish ()
 
bool IsFinish ()
 
void PlayImpact (Vector3 point, Vector3 normal)
 
void PlaySceneImpactEffect (Vector3 point, Vector3 normal)
 
void PlayShootEffect ()
 
void PlayDelayEffect ()
 
void PlayTailEffect ()
 
void EnableTrail (bool e)
 
bool IsIgnoreDamage (Tagger.Tag t)
 
bool IsIgnoreSameHolder (PhysicsUnit pu)
 
bool IgnoreCollisionWithSameCamp (float ct, string camp)
 
virtual void OnImpact (Collision collision)
 
void CollisionCountUpdate ()
 
void OnCollisionUpdate (Collision collision)
 
virtual void OnCollision (Collision collision, PhysicsUnit pu)
 
virtual void OnCollisionWithRole (FullCharacterControl fc, RagdollMuscle mu, Rigidbody rb, Collider col, Vector3 point, Vector3 normal, Vector3 relaVel)
 Collision with role. More...
 
virtual void OnCollisionWithPlayerHand (Collision collision, InteractHand hand)
 
virtual void OnCollisionWithPlayer (Collision collision, InteractCharacter player)
 
override void OnCollisionWithHitScan (Rigidbody rb, Collider col, Vector3 point, Vector3 normal, Vector3 relaVel)
 
void OnTriggerEnter (Collider collider)
 
virtual void OnTriggerWithPlayer (PhysicsUnit pu, Collider collider)
 
virtual void OnTriggerWithRole (FullCharacterControl fc, Collider collider)
 
virtual void OnTriggerWithPlayerHand (Collider collider, InteractHand hand)
 
virtual void OnTriggerWithStaticScene (Collider other)
 
virtual void OnTrigger (PhysicsUnit pu, Collider other)
 

Static Public Member Functions

static FlyObject SpawnFlyObj (string fo, string specificPath=null)
 
static PhysicsUnit SpawnFlyPhysicsUnit (string fo, string specificPath=null)
 
static FlyObject CreateFlyObj (string flyObjectName, InteractBase owner, Vector3 pos, Vector3 dir, float vel=-1, string specificPath=null)
 
static PhysicsUnit CreateFlyPhysicsUnit (string flyObjectName, InteractBase owner, Vector3 pos, Vector3 dir, float vel=-1, string specificPath=null)
 
static FlyObject GetFlyObj (Transform trans)
 
static void CopyWeaponBuffToUnit (PhysicsUnit from, PhysicsUnit to)
 

Public Attributes

string flyObjName
 
InteractBase owner
 
AIProxy ownerHolder
 
string camp
 
Transform shootTarget
 
Collider col
 
float force = 10
 
float maxFlyTime = 8f
 
bool forwardAlwayFollowVelocity = false
 
bool dealDmgAsArrow = false
 
bool flyAtSpawn = true
 
Vector3 flyDir
 
string flyObjTobeCreatedOnImpact
 
int collisionCount = 1
 
int collisionFlyCount = 1
 
float delayToAcc = -1
 
string delayEffect
 
SoundEffectInfo delaySound
 
string shootEffect
 
SoundEffectInfo shootSound
 
string impactEffect
 
string impactSceneDecal
 
SoundEffectInfo impactSound
 
string tailEffect
 
TrailRenderer trail
 
ParticleSystem[] resetParticles
 
bool playImpactOnTimeout = false
 
Tagger.Tag[] ignoreDamageList
 
bool ignoreHolder = true
 

Static Public Attributes

const string FlyObjPath = "FlyObj/"
 

Protected Member Functions

void Awake ()
 
void OnDestroy ()
 
void Reset ()
 
void OnDisable ()
 
void FixedUpdate ()
 
virtual void ResetState ()
 
void OnImpact (Rigidbody rb, Collider col, Vector3 point, Vector3 normal, Vector3 relaVel)
 
virtual void OnCollisionUpdate (Rigidbody rb, Collider col, Vector3 point, Vector3 normal, Vector3 relaVel)
 
virtual void OnCollisionWithScene (Collision collision)
 

Protected Attributes

bool flying = false
 
bool flyStopped = false
 
float flyStopTime
 
int flyRecyleTimeActId = -1
 
float flyStartTime
 
int enterCollisionCounter
 
int delayActId = -1
 
bool isFinishing = false
 

Events

System.Action< FlyObjectSpawnEvent
 
System.Action< FlyObjectFlyEvent
 
System.Action< FlyObjectFlyStopEvent
 
System.Action< FlyObjectTimeoutEvent
 
System.Action< FlyObjectDespawnEvent
 

Detailed Description

Used for bullet, magic FlyObject resources need to be located under the path of "FlyObject/"

Member Function Documentation

◆ OnCollisionWithRole()

virtual void CrossLink.FlyObject.OnCollisionWithRole ( FullCharacterControl  fc,
RagdollMuscle  mu,
Rigidbody  rb,
Collider  col,
Vector3  point,
Vector3  normal,
Vector3  relaVel 
)
virtual

Collision with role.

Parameters
fcFullCharacterControl of the role we hit.
muthe RagdollMuscle we hit.
rbThe Rigidbody of the object hit the role.
colThe Collider of the object hit the role.
pointThe impact point in world space.
normalThe normal of the surface the collider hit.
relaVelThe velocity of the object hit the role.

Reimplemented in CrossLink.IceBall, CrossLink.HealBall, CrossLink.FlyThunder, CrossLink.FlySlash, CrossLink.FlyObjectX, and CrossLink.FlyArrowBase.

◆ OnDelay()

virtual void CrossLink.FlyObject.OnDelay ( float  t,
float  s 
)
virtual

Set delayToAcc time, each frame OnDelay will be call after FlyStart function.

Parameters
t
s

Reimplemented in CrossLink.FlyObjectX.

◆ OnDelayEnd()

virtual void CrossLink.FlyObject.OnDelayEnd ( )
virtual

Call at the end of the delay timer.

Reimplemented in CrossLink.FlyObjectX.