public void OnUserDataKey(SsPart part, SsAttrValueInterface val) { var udk = val as SsUserDataKeyValue; Debug.LogWarning(part.Sprite.gameObject.name + ": " + udk.String); part.OnUserDataKey -= OnUserDataKey; }
public void OnSoundKey(SsPart part, SsAttrValueInterface val) { SsSoundKeyValue sv = val as SsSoundKeyValue; Debug.LogWarning(part.Sprite.gameObject.name + ": " + sv.SoundId); part.OnSoundKey -= OnSoundKey; }
public void OnUserDataKey(SsPart part, SsAttrValueInterface val) { SsUserDataKeyValue u = val as SsUserDataKeyValue; if (u.String == "HIT!!!") { // start collision detection _swordObject.EnableCollision(true); SsGameTest._instance._swordLength *= 1.5f; SsGameTest._instance._swordWidth *= 1.25f; } if (u.String == "DONE") { // restore the sword length SsGameTest._instance._swordLength = _orgSwordLength; SsGameTest._instance._swordWidth = _orgSwordWidth; part.OnUserDataKey -= OnUserDataKey; } }