ITween函数总结(一)

void OnAvatarLoaded(UI.AvatarRotation rot)
{
if(shadowAsset == null)
{
Logger.LogError("shadow asset is null");
return;
}


if(rot && rot.avatar)
{
var shadow = Object.Instantiate(shadowAsset.Asset) as GameObject;
if(shadow)
{
Object.DontDestroyOnLoad(shadow);
shadows.Add(shadow);


shadow.transform.position = rot.avatar.transform.position;


var ratio = 1.0f;
var collider = rot.avatar.GetComponent();
if(collider)
ratio = collider.radius / 0.2f;
UI.TransformTools.ChangeLayersRecursively(shadow.transform, LayerMask.NameToLayer("Avatar"));
EffectComp.ScaleShurikenSystems(ratio, shadow);
}
else
{
Logger.LogError("create shadow failed");
}
}
}

你可能感兴趣的:(ITween,Unity3d)